Sha256: dbc30dcc1c50142fee75463164e236e78629fa39cb06172e6e1e022434cc1b9b
Contents?: true
Size: 1.93 KB
Versions: 918
Compression:
Stored size: 1.93 KB
Contents
import React from 'react' import PropTypes from 'prop-types' import { Collapsible, useCollapsible, Flex, Title, List, ListItem } from 'playbook-ui' const CollapsibleCustomMainWithIcon = (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" /> <Collapsible.Icon collapsed={isCollapsed} /> </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> </> ) } CollapsibleCustomMainWithIcon.propTypes = { dark: PropTypes.bool, } export default CollapsibleCustomMainWithIcon
Version data entries
918 entries across 918 versions & 2 rubygems