Constructor
# <LayerPanelPage children label tabIcon />
PropTypes:
Name | Type | Required | Description | Default |
---|---|---|---|---|
children |
node | No | An array of components (likely a LayerPanelHeader, LayerPanelContent, or LayerPanelFooter) | |
label |
string | No | A string title of the page. Will be used as tab title. | |
tabIcon |
node | No | A @material-ui/icon. Check LayerPanelPage example.md for more clarification |
- Since:
- 0.5.0
Examples
If you want an easy way to add a second page use the LayerPanelPage
component and give it an icon. We use @material-ui/icons
most of the time, they work well. This gives you a second page that has it's own tab to toggle through. Or if you want a title for the tab you can pass a label string prop.
import { LayerPanel, LayerPanelPage, LayerPanelContent } from '@bayer/ol-kit'
import VpnKeyIcon from '@material-ui/icons/VpnKeyIcon'
return (
<LayerPanel>
<LayerPanelPage label={'Legends'} tabIcon={<VpnKeyIcon />}>
<LayerPanelContent>
Legends Page
</LayerPanelContent>
</LayerPanelPage>
</LayerPanel>
)