Skip to content

Commit

Permalink
Docs(web-react): Remove isOpen prop from Buttons in Collapse demo
Browse files Browse the repository at this point in the history
  • Loading branch information
literat committed Aug 26, 2024
1 parent a3ca88d commit d9c1636
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ const CollapseDefault = () => {

return (
<>
<Button isOpen={isOpen} onClick={toggleHandler}>
Collapse trigger
</Button>
<Button onClick={toggleHandler}>Collapse trigger</Button>
<Collapse id="collapse-default-id" isOpen={isOpen}>
Aliquam varius, consequat posuere a lacinia mauris eu tellus condimentum ut id ante, accumsan vehicula nulla
neque. Mauris mi orci, in donec nullam odio leo sapien et vehicula nunc a lacinia, fermentum arcu ullamcorper
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const CollapseHelperClass = () => {
bibendum nunc aenean facilisis. Phasellus euismod, donec sem odio ligula praesent finibus nibh convallis,
tristique aliquam sed id tortor sem lobortis.
</Collapse>
<Button isOpen={isOpen} onClick={toggleHandler} aria-expanded={isOpen}>
<Button onClick={toggleHandler} aria-expanded={isOpen}>
<span className="accessibility-open">Show less</span>
<span className="accessibility-closed">Show more</span>
</Button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ const CollapseMultipleTriggers = () => {

return (
<>
<Button isOpen={isOpen} onClick={toggleHandler}>
Collapse trigger
</Button>
<Button onClick={toggleHandler}>Collapse trigger</Button>
<Collapse id="collapse-multiple-triggers-id" isOpen={isOpen}>
Aliquam varius, consequat posuere a lacinia mauris eu tellus condimentum ut id ante, accumsan vehicula nulla
neque. Mauris mi orci, in donec nullam odio leo sapien et vehicula nunc a lacinia, fermentum arcu ullamcorper
Expand All @@ -20,7 +18,7 @@ const CollapseMultipleTriggers = () => {
bibendum nunc aenean facilisis. Phasellus euismod, donec sem odio ligula praesent finibus nibh convallis,
tristique aliquam sed id tortor sem lobortis.
</Collapse>
<Button isOpen={isOpen} onClick={toggleHandler} color="secondary">
<Button onClick={toggleHandler} color="secondary">
Secondary trigger
</Button>{' '}
<ButtonLink onClick={toggleHandler} aria-expanded={isOpen} color="tertiary">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ const CollapseOpenOnInit = () => {

return (
<>
<Button isOpen={isOpen} onClick={toggleHandler}>
Collapse trigger
</Button>
<Button onClick={toggleHandler}>Collapse trigger</Button>
<Collapse id="collapse-open-on-init-id" isOpen={isOpen}>
Cras dictum ante, mollis ollicitudin proin bibendum nec commodo consequat fusce ante, consequat venenatis
suscipit odio morbi. Dolor sit amet porta, placerat tristique sit amet ligula nisl risus et vehicula, suscipit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const CollapseVisibilityBreakpointDesktop = () => {

return (
<>
<ButtonLink isOpen={isOpenDesktop} onClick={toggleHandlerDesktop} size="medium" UNSAFE_className="d-desktop-none">
<ButtonLink onClick={toggleHandlerDesktop} size="medium" UNSAFE_className="d-desktop-none">
Collapse trigger
</ButtonLink>
<Collapse id="collapse-visibility-breakpoint-desktop-id" isOpen={isOpenDesktop} collapsibleToBreakpoint="desktop">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const CollapseVisibilityBreakpointTablet = () => {

return (
<>
<ButtonLink isOpen={isOpenTablet} onClick={toggleHandlerTablet} size="medium" UNSAFE_className="d-tablet-none">
<ButtonLink onClick={toggleHandlerTablet} size="medium" UNSAFE_className="d-tablet-none">
Collapse trigger
</ButtonLink>
<Collapse id="collapse-visibility-breakpoint-tablet-id" isOpen={isOpenTablet} collapsibleToBreakpoint="tablet">
Expand Down

0 comments on commit d9c1636

Please sign in to comment.