The ThemeEditorButton
renders a ready-made button that opens the ThemeEditorDrawer
.
It should be used as a direct child of ThemeEditor
component.
View source
import { ThemeEditorButton } from '@hypertheme-editor/chakra-ui'
import { ThemeEditorButton } from '@hypertheme-editor-pro/chakra-ui'
This component doesn't work on itself, it must be a direct child of the ThemeEditor
component.
Here's an example of a theme editor with a standard ThemeEditorButton:
ThemeEditorButton accepts all props from Chakra UI ButtonProps
, this example demonstrate how the customization can be done:
Name | Type | Default | Short Description |
---|---|---|---|
onOpen | () => void | undefined | Callback that opens the ThemeEditorDrawer |
label | string | undefined | An optional label |
This component accepts also ButtonProps
from the Chakra UI Button
component, read more here.
The onClose
prop is called when clicking on the "close drawer" button.
This prop is overrided by the ThemeEditorDrawer
component, so you don't have to mind it.
An optional label to show.
Here's an example:
Prev
Next