Sha256: 52650f7224a197d9b0cb06db99c4be7aae97d813f15f964cdabec33deaf9f1ba

Contents?: true

Size: 1.84 KB

Versions: 918

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

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