Sha256: 516ff653e08a8833c7f2521d22f08940a908895aab85abf704bb8879a20a283c

Contents?: true

Size: 1.94 KB

Versions: 72

Compression:

Stored size: 1.94 KB

Contents

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

const CollapsibleCustomMainWithIcon = () => {
  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" 
                />
                <Collapsible.Icon collapsed={isCollapsed}/>
              </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 CollapsibleCustomMainWithIcon

Version data entries

72 entries across 72 versions & 2 rubygems

Version Path
playbook_ui_docs-13.33.1.pre.alpha.PLAY14063320 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx
playbook_ui-13.33.1.pre.alpha.PLAY14063320 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx
playbook_ui-13.33.1 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx
playbook_ui_docs-13.33.0.pre.alpha.PBNTR405dropdownformfixesrails3311 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx
playbook_ui-13.33.0.pre.alpha.PBNTR405dropdownformfixesrails3311 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx
playbook_ui_docs-13.33.0.pre.alpha.PLAY1454formpillicons3309 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx
playbook_ui-13.33.0.pre.alpha.PLAY1454formpillicons3309 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx
playbook_ui-13.33.0 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx
playbook_ui_docs-13.32.0.pre.alpha.PBNTR405dropdownformfixesrails3301 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx
playbook_ui-13.32.0.pre.alpha.PBNTR405dropdownformfixesrails3301 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx
playbook_ui_docs-13.32.0.pre.alpha.PLAY1138iconkitaddcolorprop3268 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx
playbook_ui-13.32.0.pre.alpha.PLAY1138iconkitaddcolorprop3268 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx
playbook_ui_docs-13.32.0.pre.alpha.play1416movealiaslogic3266 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx
playbook_ui-13.32.0.pre.alpha.play1416movealiaslogic3266 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx
playbook_ui_docs-13.32.0.pre.alpha.play1416movealiaslogic3239 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx
playbook_ui-13.32.0.pre.alpha.play1416movealiaslogic3239 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx
playbook_ui_docs-13.32.0.pre.alpha.PLAY14103236 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx
playbook_ui-13.32.0.pre.alpha.PLAY14103236 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx
playbook_ui_docs-13.31.0.pre.alpha.play1416movealiaslogic3232 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx
playbook_ui-13.31.0.pre.alpha.play1416movealiaslogic3232 app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx