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-13.34.1.pre.alpha.pbntr258paginationkitforreact3409 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx
playbook_ui-13.34.1.pre.alpha.pbntr258paginationkitforreact3409 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx
playbook_ui_docs-13.34.1.pre.alpha.pbntr258paginationkitforreact3404 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx
playbook_ui-13.34.1.pre.alpha.pbntr258paginationkitforreact3404 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx
playbook_ui_docs-13.34.1.pre.alpha.powerfontsexternal3403 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx
playbook_ui-13.34.1.pre.alpha.powerfontsexternal3403 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx
playbook_ui_docs-14.0.0 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx
playbook_ui-14.0.0 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx
playbook_ui_docs-13.34.1.pre.alpha.PLAY14633399 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx
playbook_ui-13.34.1.pre.alpha.PLAY14633399 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx
playbook_ui_docs-13.34.0.pre.alpha.PLAY14143373 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx
playbook_ui-13.34.0.pre.alpha.PLAY14143373 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx
playbook_ui_docs-13.34.0.pre.alpha.PLAY14143372 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx
playbook_ui-13.34.0.pre.alpha.PLAY14143372 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx
playbook_ui_docs-13.34.0.pre.alpha.PLAY14143358 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx
playbook_ui-13.34.0.pre.alpha.PLAY14143358 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx
playbook_ui_docs-13.34.0.pre.alpha.PLAY14143357 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx
playbook_ui-13.34.0.pre.alpha.PLAY14143357 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx