-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
1fbadad
commit 150e54c
Showing
10 changed files
with
171 additions
and
149 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-components/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-components/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.