feat(react): Change the expand icon to have the arrows point inwards if expand is disabled
This commit is contained in:
parent
9c3155823c
commit
96ae664829
2 changed files with 13 additions and 3 deletions
|
@ -11,6 +11,7 @@ import { ViewIcon, viewLabels } from './views/index.mjs'
|
|||
import { Tooltip } from './Tooltip.mjs'
|
||||
import {
|
||||
AsideIcon,
|
||||
CompactIcon,
|
||||
DetailIcon,
|
||||
ExpandIcon,
|
||||
ExportIcon,
|
||||
|
@ -336,9 +337,11 @@ export const HeaderMenuDraftViewIcons = (props) => {
|
|||
}
|
||||
tooltip="Turns Expand on or off (see Core Settings)"
|
||||
>
|
||||
<ExpandIcon
|
||||
className={`${size} ${[false, 0, '0'].includes(settings.expand) ? style.custom : style.dflt}`}
|
||||
/>
|
||||
{[false, 0, '0'].includes(settings.expand) ? (
|
||||
<CompactIcon className={`${size} ${style.custom}`} />
|
||||
) : (
|
||||
<ExpandIcon className={`${size} ${style.dflt}`} />
|
||||
)}
|
||||
</Button>
|
||||
) : null}
|
||||
<HeaderMenuIconSpacer />
|
||||
|
|
|
@ -143,6 +143,13 @@ export const CodeIcon = (props) => (
|
|||
</IconWrapper>
|
||||
)
|
||||
|
||||
// Looks like arrows pointing inwards
|
||||
export const CompactIcon = (props) => (
|
||||
<IconWrapper {...props}>
|
||||
<path d="m15 15v4.5m0-4.5h4.5m-15.8-11.3 5.25 5.25m6 0v-4.5m0 4.5h4.5m-15.8 11.3 5.25-5.25h-4.5m4.5 0v4.5m11.3-15.8-5.25 5.25m-6 0h-4.5m4.5 0v-4.5m11.3 15.8-5.25-5.25" />
|
||||
</IconWrapper>
|
||||
)
|
||||
|
||||
// FIXME
|
||||
export const CompareIcon = (props) => (
|
||||
<IconWrapper {...props}>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue