mirror of
https://github.com/zadam/trilium.git
synced 2025-11-21 16:14:23 +01:00
client/note color picker menu item: refactor
This commit is contained in:
parent
87fcc0afe6
commit
e5ac8a0a67
@ -52,7 +52,14 @@ export default function ColorPickerMenuItem(props: ColorPickerMenuItemProps) {
|
||||
</div>
|
||||
}
|
||||
|
||||
function ColorCell(props: {color: string, isSelected: boolean, isDisabled?: boolean, onClick?: () => void}) {
|
||||
interface ColorCellProps {
|
||||
color: string,
|
||||
isSelected: boolean,
|
||||
isDisabled?: boolean,
|
||||
onClick?: () => void
|
||||
}
|
||||
|
||||
function ColorCell(props: ColorCellProps) {
|
||||
return <div class={`color-cell ${props.isSelected ? "selected" : ""} ${props.isDisabled ? "disabled-color-cell" : ""}`}
|
||||
style={`background-color: ${props.color}`}
|
||||
onClick={props.onClick}>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user