Collection of theme-ui and external components.
created:3/15/2021
updated:3/15/2021
source lines:40
comments %:10

ColorMode

Theme-ui dark/light mode toggle.

Component

import { ColorMode } from '@component-controls/components';

Overview

() => (
<ThemeProvider>
<ColorMode />
</ThemeProvider>
)

Properties

Name
Description
Default
ToggleOwnProps (2 properties)
label

optional label to be displayed alongside the toggle

string
-
ref

obtain a ref target

Ref<ReactSwitch>
-
ReactSwitchProps (14 properties)

External dependencies

package
imports
peer
SunIconMoonIcon
react
^17.0.1
FC
*
theme-ui
^0.6.0-alpha.7
useColorModejsxBox

Internal dependencies

file
imports
"../Toggle"
ToggleToggleProps

Component JSX