mirror of
https://github.com/Qortal/chrome-extension.git
synced 2025-07-26 11:41:25 +00:00
change color for editor btns
This commit is contained in:
@@ -146,11 +146,17 @@ const MenuBar = ({ setEditorRef, isChat }) => {
|
|||||||
>
|
>
|
||||||
<CodeIcon />
|
<CodeIcon />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
<IconButton sx={{
|
<IconButton
|
||||||
padding: isMobile ? '5px' : 'revert'
|
onClick={() => editor.chain().focus().unsetAllMarks().run()}
|
||||||
}} onClick={() => editor.chain().focus().unsetAllMarks().run()}>
|
sx={{
|
||||||
|
color: editor.isActive('bold') || editor.isActive('italic') || editor.isActive('strike') || editor.isActive('code')
|
||||||
|
? 'white'
|
||||||
|
: 'gray',
|
||||||
|
padding: isMobile ? '5px' : 'revert',
|
||||||
|
}}
|
||||||
|
>
|
||||||
<FormatClearIcon />
|
<FormatClearIcon />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
<IconButton
|
<IconButton
|
||||||
onClick={() => editor.chain().focus().toggleBulletList().run()}
|
onClick={() => editor.chain().focus().toggleBulletList().run()}
|
||||||
// color={editor.isActive('bulletList') ? 'white' : 'gray'}
|
// color={editor.isActive('bulletList') ? 'white' : 'gray'}
|
||||||
@@ -191,9 +197,16 @@ const MenuBar = ({ setEditorRef, isChat }) => {
|
|||||||
>
|
>
|
||||||
<FormatQuoteIcon />
|
<FormatQuoteIcon />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
<IconButton onClick={() => editor.chain().focus().setHorizontalRule().run()}>
|
<IconButton
|
||||||
|
onClick={() => editor.chain().focus().setHorizontalRule().run()}
|
||||||
|
disabled={!editor.can().chain().focus().setHorizontalRule().run()}
|
||||||
|
sx={{
|
||||||
|
color: 'gray',
|
||||||
|
padding: isMobile ? '5px' : 'revert',
|
||||||
|
}}
|
||||||
|
>
|
||||||
<HorizontalRuleIcon />
|
<HorizontalRuleIcon />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
<IconButton
|
<IconButton
|
||||||
onClick={() => editor.chain().focus().toggleHeading({ level: 1 }).run()}
|
onClick={() => editor.chain().focus().toggleHeading({ level: 1 }).run()}
|
||||||
// color={editor.isActive('heading', { level: 1 }) ? 'white' : 'gray'}
|
// color={editor.isActive('heading', { level: 1 }) ? 'white' : 'gray'}
|
||||||
|
Reference in New Issue
Block a user