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

Version Path
playbook_ui_docs-14.11.1.pre.alpha.PLAY1750pbcontenttagkitbutton5340 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx
playbook_ui-14.11.1.pre.alpha.PLAY1750pbcontenttagkitbutton5340 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx
playbook_ui_docs-14.11.1.pre.alpha.PLAY1750pbcontenttagkitbutton5339 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx
playbook_ui-14.11.1.pre.alpha.PLAY1750pbcontenttagkitbutton5339 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx
playbook_ui_docs-14.12.0.pre.rc.3 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx
playbook_ui-14.12.0.pre.rc.3 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx
playbook_ui_docs-14.12.0.pre.rc.2 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx
playbook_ui-14.12.0.pre.rc.2 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx
playbook_ui_docs-14.12.0.pre.rc.1 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx
playbook_ui-14.12.0.pre.rc.1 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx
playbook_ui_docs-14.12.0.pre.rc.0 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx
playbook_ui-14.12.0.pre.rc.0 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx
playbook_ui_docs-14.10.0.pre.alpha.PLAY1774timelinelabelstepspacing5315 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx
playbook_ui-14.10.0.pre.alpha.PLAY1774timelinelabelstepspacing5315 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx
playbook_ui_docs-14.10.0.pre.alpha.PLAY1774timelinelabelstepspacing5314 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx
playbook_ui-14.10.0.pre.alpha.PLAY1774timelinelabelstepspacing5314 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx
playbook_ui_docs-14.10.0.pre.alpha.PLAY1750pbcontenttagkitbutton5308 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx
playbook_ui-14.10.0.pre.alpha.PLAY1750pbcontenttagkitbutton5308 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx
playbook_ui-14.11.1 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx
playbook_ui_docs-14.11.0.pre.rc.17 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx