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

Version Path
playbook_ui_docs-14.9.0.pre.rc.8 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main.jsx
playbook_ui-14.9.0.pre.rc.8 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main.jsx
playbook_ui_docs-14.8.0.pre.alpha.PLAY1598floatinguiupgrade4617 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main.jsx
playbook_ui-14.8.0.pre.alpha.PLAY1598floatinguiupgrade4617 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main.jsx
playbook_ui_docs-14.9.0.pre.rc.7 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main.jsx
playbook_ui-14.9.0.pre.rc.7 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main.jsx
playbook_ui_docs-14.9.0.pre.rc.6 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main.jsx
playbook_ui-14.9.0.pre.rc.6 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main.jsx
playbook_ui_docs-14.9.0.pre.rc.5 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main.jsx
playbook_ui-14.9.0.pre.rc.5 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main.jsx
playbook_ui_docs-14.8.0.pre.alpha.pbntr661createstickyleftprop4612 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main.jsx
playbook_ui-14.8.0.pre.alpha.pbntr661createstickyleftprop4612 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main.jsx
playbook_ui_docs-14.8.0.pre.alpha.play1648heightglobalprops4606 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main.jsx
playbook_ui-14.8.0.pre.alpha.play1648heightglobalprops4606 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main.jsx
playbook_ui_docs-14.9.0.pre.rc.4 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main.jsx
playbook_ui-14.9.0.pre.rc.4 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main.jsx
playbook_ui_docs-14.9.0.pre.rc.3 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main.jsx
playbook_ui-14.9.0.pre.rc.3 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main.jsx
playbook_ui_docs-14.9.0.pre.rc.2 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main.jsx
playbook_ui-14.9.0.pre.rc.2 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main.jsx