diff --git a/tldraw/apps/tldraw-logseq/src/components/inputs/ColorInput.tsx b/tldraw/apps/tldraw-logseq/src/components/inputs/ColorInput.tsx index 53150cf8ef2..fd6f09dc9f0 100644 --- a/tldraw/apps/tldraw-logseq/src/components/inputs/ColorInput.tsx +++ b/tldraw/apps/tldraw-logseq/src/components/inputs/ColorInput.tsx @@ -1,7 +1,19 @@ import * as React from 'react' +import * as Popover from '@radix-ui/react-popover'; +import { TablerIcon } from '../icons' interface ColorInputProps extends React.InputHTMLAttributes {} +enum HighlightColor { + Gray = 'gray', + Red = 'red', + Yellow = 'yellow', + Green = 'green', + Blue = 'blue', + Purple = 'purple', + Pink = 'pink', +} + export function ColorInput({ value, onChange, ...rest }: ColorInputProps) { const ref = React.useRef(null) const [computedValue, setComputedValue] = React.useState(value) @@ -18,19 +30,41 @@ export function ColorInput({ value, onChange, ...rest }: ColorInputProps) { }, [value]) return ( -
-
- { - setComputedValue(e.target.value) - onChange?.(e) - }} - {...rest} - /> -
-
+ + +
+
+
+
+
+ + + +
+ {Object.values(HighlightColor).map(value => + +
+ +
+
+
) } diff --git a/tldraw/apps/tldraw-logseq/src/styles.css b/tldraw/apps/tldraw-logseq/src/styles.css index 083e0e38f0d..be8bce903b9 100644 --- a/tldraw/apps/tldraw-logseq/src/styles.css +++ b/tldraw/apps/tldraw-logseq/src/styles.css @@ -848,3 +848,25 @@ html[data-theme='dark'] { pointer-events: all; stroke-width: min(100px, calc(12px * var(--tl-scale))); } + +.tl-popover-content { + border-radius: 4px; + padding: 20px; + background-color: var(--ls-secondary-background-color); + z-index: 100000; +} + +.tl-popover-arrow { + fill: var(--ls-secondary-background-color); +} + +.tl-color-palette { + @apply flex; +} + +.tl-color-drip { + width: 30px; + height: 30px; + margin: 2px; + border: 1px solid var(--ls-secondary-border-color); +}