Sha256: 52650f7224a197d9b0cb06db99c4be7aae97d813f15f964cdabec33deaf9f1ba
Contents?: true
Size: 1.84 KB
Versions: 641
Compression:
Stored size: 1.84 KB
Contents
import React from 'react' import PropTypes from 'prop-types' import { Collapsible, useCollapsible, Flex, Title, List, ListItem } from 'playbook-ui' const CollapsibleCustomMain = (props) => { const [isCollapsed, setIsCollapsed] = useCollapsible(true) return ( <> <Collapsible collapsed={isCollapsed}> <Flex align="center" cursor="pointer" gap="sm" htmlOptions={{onClick:() => setIsCollapsed(!isCollapsed)}} justify="between" position="sticky" top="0" > <Title dark={props.dark} size={4} text="Custom Main Section" /> </Flex> <Collapsible.Content padding="none"> <div> <List> <ListItem align="stretch" flexDirection="column" > {"Checklist item"} </ListItem> <ListItem align="stretch" flexDirection="column" > {"Checklist item"} </ListItem> <ListItem align="stretch" flexDirection="column" > {"Checklist item"} </ListItem> <ListItem align="stretch" flexDirection="column" > {"Checklist item"} </ListItem> <ListItem align="stretch" flexDirection="column" > {"Checklist item"} </ListItem> </List> </div> </Collapsible.Content> </Collapsible> </> ) } CollapsibleCustomMain.propTypes = { dark: PropTypes.bool, } export default CollapsibleCustomMain
Version data entries
641 entries across 641 versions & 2 rubygems