Sha256: e12c1e8be0456777efa60155e8c9689366101e33193ce90159b29791410c887b

Contents?: true

Size: 1.87 KB

Versions: 72

Compression:

Stored size: 1.87 KB

Contents

import React from 'react'
import { Collapsible, useCollapsible, Background, Flex, Title, List, ListItem } from '../..'

const CollapsibleCustomMain = () => {
  const [isCollapsed, setIsCollapsed] = useCollapsible(true)

  return (
  <>
    <Collapsible
        collapsed={isCollapsed}
    >
          <Background 
              backgroundColor="white" 
              cursor="pointer"
              htmlOptions={{onClick:() => setIsCollapsed(!isCollapsed)}}
              position="sticky" 
              top="0" 
          >
              <Flex 
                  align="center" 
                  gap="sm"
                  justify="between" 
              >
                <Title 
                    size={4} 
                    text="Custom Main Section" 
                />
              </Flex>
          </Background>
      <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>
   
  </>
  )
}

export default CollapsibleCustomMain

Version data entries

72 entries across 72 versions & 2 rubygems

Version Path
playbook_ui_docs-13.28.0.pre.alpha.pbntr312tableheaderflexremoval3019 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main.jsx
playbook_ui-13.28.0.pre.alpha.pbntr312tableheaderflexremoval3019 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main.jsx
playbook_ui_docs-13.28.0.pre.alpha.dialogturbostreameventlistener3017 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main.jsx
playbook_ui-13.28.0.pre.alpha.dialogturbostreameventlistener3017 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main.jsx
playbook_ui_docs-13.28.0.pre.alpha.PLAY1338alpha3001 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main.jsx
playbook_ui-13.28.0.pre.alpha.PLAY1338alpha3001 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main.jsx
playbook_ui_docs-13.28.0.pre.alpha.PLAY1343fixTooltiprunwayissue2987 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main.jsx
playbook_ui-13.28.0.pre.alpha.PLAY1343fixTooltiprunwayissue2987 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main.jsx
playbook_ui_docs-13.28.0.pre.alpha.PLAY1343fixTooltiprunwayissue2986 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main.jsx
playbook_ui-13.28.0.pre.alpha.PLAY1343fixTooltiprunwayissue2986 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main.jsx
playbook_ui_docs-13.28.0.pre.alpha.PLAY1343fixTooltiprunwayissue2984 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main.jsx
playbook_ui-13.28.0.pre.alpha.PLAY1343fixTooltiprunwayissue2984 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main.jsx