Add more highlighter color choices (#7012)

* Add more highlighter color choices, closes #7011

* docs
This commit is contained in:
Tom Moor
2024-06-09 13:54:31 -04:00
committed by GitHub
parent 808415b906
commit ed59b3e350
10 changed files with 167 additions and 34 deletions

View File

@@ -20,7 +20,7 @@ type Props = {
/*
* Renders a dropdown menu in the floating toolbar.
*/
function ToolbarDropdown(props: { item: MenuItem }) {
function ToolbarDropdown(props: { active: boolean; item: MenuItem }) {
const menu = useMenuState();
const { commands, view } = useEditor();
const { item } = props;
@@ -102,7 +102,7 @@ function ToolbarMenu(props: Props) {
key={index}
>
{item.children ? (
<ToolbarDropdown item={item} />
<ToolbarDropdown active={isActive && !item.label} item={item} />
) : (
<ToolbarButton
onClick={handleClick(item)}