menu
announcement

Spectrum is now read-only. Learn more about the decision in our official announcement.

geist-deprecated

Redirect to https://github.com/geist-org/react/discussions

Channels
Team

Change a color pallete from both themes light and black

December 17, 2020 at 1:19pm

Change a color pallete from both themes light and black

December 17, 2020 at 1:19pm
How can change the pallete.selection when use two themes?
in app i use:
const theme = useTheme() const [customTheme, setCustomTheme] = useState<DeepPartial<GeistUIThemes>>({}) const themeChangeHandle = (theme: DeepPartial<GeistUIThemes>) => { setCustomTheme(theme) }
useEffect(() => { window.scrollTo({ top: 0 }) const theme = window.localStorage.getItem('theme') if (theme !== 'dark') return themeChangeHandle({ type: 'dark' }) }, [])

December 17, 2020 at 1:25pm
in next.js i import a css file to corret this: ::selection { background-color: #0070f3 !important; color: #fff; }