forked from mui/base-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
3a2fd7e
commit 169ba04
Showing
14 changed files
with
208 additions
and
393 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
'use client'; | ||
import * as React from 'react'; | ||
import { Accordion } from '@base_ui/react/Accordion'; | ||
import classes from './styles.module.css'; | ||
|
||
export default function AccordionIntroduction() { | ||
return ( | ||
<Accordion.Root className={classes.root} aria-label="Base UI Accordion"> | ||
<Accordion.Item className={classes.item}> | ||
<Accordion.Header className={classes.header}> | ||
<Accordion.Trigger className={classes.trigger}> | ||
Trigger 1 | ||
<ExpandMoreIcon /> | ||
</Accordion.Trigger> | ||
</Accordion.Header> | ||
<Accordion.Panel className={classes.panel}> | ||
This is the contents of Accordion.Panel 1 | ||
</Accordion.Panel> | ||
</Accordion.Item> | ||
<Accordion.Item className={classes.item}> | ||
<Accordion.Header className={classes.header}> | ||
<Accordion.Trigger className={classes.trigger}> | ||
Trigger 2 | ||
<ExpandMoreIcon /> | ||
</Accordion.Trigger> | ||
</Accordion.Header> | ||
<Accordion.Panel className={classes.panel}> | ||
This is the contents of Accordion.Panel 2 | ||
</Accordion.Panel> | ||
</Accordion.Item> | ||
<Accordion.Item className={classes.item}> | ||
<Accordion.Header className={classes.header}> | ||
<Accordion.Trigger className={classes.trigger}> | ||
Trigger 3 | ||
<ExpandMoreIcon /> | ||
</Accordion.Trigger> | ||
</Accordion.Header> | ||
<Accordion.Panel className={classes.panel}> | ||
This is the contents of Accordion.Panel 3 | ||
</Accordion.Panel> | ||
</Accordion.Item> | ||
</Accordion.Root> | ||
); | ||
} | ||
|
||
function ExpandMoreIcon(props) { | ||
return ( | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
width="24" | ||
height="24" | ||
viewBox="0 0 24 24" | ||
className={classes.icon} | ||
{...props} | ||
> | ||
<path d="M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z" fill="currentColor" /> | ||
</svg> | ||
); | ||
} |
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,59 @@ | ||
'use client'; | ||
import * as React from 'react'; | ||
import { Accordion } from '@base_ui/react/Accordion'; | ||
import classes from './styles.module.css'; | ||
|
||
export default function AccordionIntroduction() { | ||
return ( | ||
<Accordion.Root className={classes.root} aria-label="Base UI Accordion"> | ||
<Accordion.Item className={classes.item}> | ||
<Accordion.Header className={classes.header}> | ||
<Accordion.Trigger className={classes.trigger}> | ||
Trigger 1 | ||
<ExpandMoreIcon /> | ||
</Accordion.Trigger> | ||
</Accordion.Header> | ||
<Accordion.Panel className={classes.panel}> | ||
This is the contents of Accordion.Panel 1 | ||
</Accordion.Panel> | ||
</Accordion.Item> | ||
<Accordion.Item className={classes.item}> | ||
<Accordion.Header className={classes.header}> | ||
<Accordion.Trigger className={classes.trigger}> | ||
Trigger 2 | ||
<ExpandMoreIcon /> | ||
</Accordion.Trigger> | ||
</Accordion.Header> | ||
<Accordion.Panel className={classes.panel}> | ||
This is the contents of Accordion.Panel 2 | ||
</Accordion.Panel> | ||
</Accordion.Item> | ||
<Accordion.Item className={classes.item}> | ||
<Accordion.Header className={classes.header}> | ||
<Accordion.Trigger className={classes.trigger}> | ||
Trigger 3 | ||
<ExpandMoreIcon /> | ||
</Accordion.Trigger> | ||
</Accordion.Header> | ||
<Accordion.Panel className={classes.panel}> | ||
This is the contents of Accordion.Panel 3 | ||
</Accordion.Panel> | ||
</Accordion.Item> | ||
</Accordion.Root> | ||
); | ||
} | ||
|
||
function ExpandMoreIcon(props: React.SVGProps<SVGSVGElement>) { | ||
return ( | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
width="24" | ||
height="24" | ||
viewBox="0 0 24 24" | ||
className={classes.icon} | ||
{...props} | ||
> | ||
<path d="M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z" fill="currentColor" /> | ||
</svg> | ||
); | ||
} |
61 changes: 0 additions & 61 deletions
61
docs/data/components/accordion/UnstyledAccordionIntroduction.js
This file was deleted.
Oops, something went wrong.
61 changes: 0 additions & 61 deletions
61
docs/data/components/accordion/UnstyledAccordionIntroduction.tsx
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.