The ThemeEditorDrawerFooter
component is the default footer component rendered inside the ThemeEditorDrawer
.
It provides a Close Drawer Button and the Export Theme Menu.
View source
@hypertheme-editor/chakra-ui-core
leads to a known issue with recoil
.@hypertheme-editor/chakra-ui
or @hypertheme-editor-pro/chakra-ui
.import { ThemeEditorDrawerFooter } from '@hypertheme-editor/chakra-ui'
import { ThemeEditorDrawerFooter } from '@hypertheme-editor-pro/chakra-ui'
ThemeEditorDrawerFooter works with the footerComponent
prop prop provided by the ThemeEditorDrawer
component.
This is a minimal example explaining how to use the component:
Name | Type | Default | Short Description |
---|---|---|---|
actionButton | ReactNode | ThemeDownloadButton | Component rendered as action button |
onClose | () => void | undefined | Callback that closes the ThemeEditorDrawer |
isMobile | boolean | undefined | boolean that hides the footer if on mobile device |
By default the ThemeEditorDrawerFooter
renders a ThemeDownloadButton
(like in the image below).
The ThemeDownloadButton
acts as a downloader for the theme using the HyperTheme API.
You can override this button putting your custom component, like in the example below:
This prop accepts a ReactElement
value.
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.
The isMobile
prop decides whenever to render the footer or not if on mobile device.
This prop is overrided by the ThemeEditorDrawer
component, so you don't have to mind it.
Prev
Next