-
-
Notifications
You must be signed in to change notification settings - Fork 772
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
100 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
import React from 'react' | ||
import { domMax, LazyMotion } from 'framer-motion' | ||
import type { DocumentComponent } from 'storybook/typings' | ||
|
||
import { StyledButton } from '../button' | ||
import { Collapse } from './Collapse' | ||
|
||
export const CollapseDemo1: DocumentComponent = () => { | ||
const [opened, setOpened] = React.useState(false) | ||
return ( | ||
<LazyMotion features={domMax}> | ||
<StyledButton onClick={() => setOpened((opened) => !opened)}> | ||
Toggle Collapse | ||
</StyledButton> | ||
<Collapse isOpened={opened}> | ||
<p> | ||
Maiores occaecati quis animi nihil debitis. Iure suscipit animi. | ||
Repellat quia quas harum possimus dolorum dolore ullam eius. Tenetur | ||
aut saepe illo expedita culpa. Nisi asperiores doloribus facere | ||
eveniet ad tempore nemo accusantium in. Possimus eum dolorum a aliquid | ||
unde dolore corporis. Voluptatem quibusdam ipsam numquam. Vero aliquid | ||
odit reiciendis amet cum sapiente commodi. Natus in ullam dignissimos | ||
sed eos accusantium. Quis eligendi aliquid. Cumque possimus sed | ||
suscipit vero. Repellendus inventore quo porro necessitatibus totam. | ||
</p> | ||
</Collapse> | ||
</LazyMotion> | ||
) | ||
} | ||
|
||
CollapseDemo1.meta = { | ||
title: 'Normal Collapse', | ||
} | ||
|
||
export const CollapseDemo2: DocumentComponent = () => { | ||
const [opened, setOpened] = React.useState(false) | ||
return ( | ||
<LazyMotion features={domMax}> | ||
<StyledButton onClick={() => setOpened((opened) => !opened)}> | ||
Toggle Collapse | ||
</StyledButton> | ||
<Collapse isOpened={opened} withBackground> | ||
<p> | ||
Maiores occaecati quis animi nihil debitis. Iure suscipit animi. | ||
Repellat quia quas harum possimus dolorum dolore ullam eius. Tenetur | ||
aut saepe illo expedita culpa. Nisi asperiores doloribus facere | ||
eveniet ad tempore nemo accusantium in. Possimus eum dolorum a aliquid | ||
unde dolore corporis. Voluptatem quibusdam ipsam numquam. Vero aliquid | ||
odit reiciendis amet cum sapiente commodi. Natus in ullam dignissimos | ||
sed eos accusantium. Quis eligendi aliquid. Cumque possimus sed | ||
suscipit vero. Repellendus inventore quo porro necessitatibus totam. | ||
</p> | ||
</Collapse> | ||
</LazyMotion> | ||
) | ||
} | ||
|
||
CollapseDemo2.meta = { | ||
title: 'With Background Collapse', | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4116060
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
shiro – ./
shiro-innei.vercel.app
innei.in
springtide.vercel.app
shiro-git-main-innei.vercel.app