-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #166 from BouyguesTelecom/add/examples
Add component examples
- Loading branch information
Showing
107 changed files
with
1,607 additions
and
131 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import React from 'react' | ||
import { Accordion, AccordionBody, AccordionHeader, AccordionItem } from './index' | ||
|
||
const AccordionExample: React.ReactNode = <Accordion> | ||
<AccordionItem | ||
active | ||
id='1' | ||
> | ||
<AccordionHeader> | ||
Hello World | ||
</AccordionHeader> | ||
<AccordionBody> | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque risus mi, tempus quis placerat ut, porta nec nulla. Vestibulum rhoncus ac ex sit amet fringilla. Nullam gravida purus diam, et dictum felis venenatis efficitur. Aenean ac eleifend lacus, in mollis lectus. Donec sodales, arcu et sollicitudin porttitor, tortor urna tempor ligula, id porttitor mi magna a neque. Donec dui urna, vehicula et sem eget, facilisis sodales sem., consectetur adipiscing elit. Pellentesque risus mi, tempus quis placerat ut, porta nec nulla. Vestibulum rhoncus ac ex sit amet fringilla. Nullam gravida purus diam, et dictum felis venenatis efficitur. Aenean ac eleifend lacus, in mollis lectus. Donec sodales, arcu et sollicitudin porttitor, tortor urna tempor ligula, id porttitor mi magna a neque. Donec dui urna, vehicula et sem eget, facilisis sodales sem. | ||
</AccordionBody> | ||
</AccordionItem> | ||
<AccordionItem id='DEUX'> | ||
<AccordionHeader> | ||
Hello World{' '} | ||
</AccordionHeader> | ||
<AccordionBody> | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque risus mi, tempus quis placerat ut, porta nec nulla. Vestibulum rhoncus ac ex sit amet fringilla. Nullam gravida purus diam, et dictum felis venenatis efficitur. Aenean ac eleifend lacus, in mollis lectus. Donec sodales, arcu et sollicitudin porttitor, tortor urna tempor ligula, id porttitor mi magna a neque. Donec dui urna, vehicula et sem eget, facilisis sodales sem. | ||
</AccordionBody> | ||
</AccordionItem> | ||
<AccordionItem id='TROIS'> | ||
<AccordionHeader> | ||
Hello World | ||
</AccordionHeader> | ||
<AccordionBody> | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque risus mi, tempus quis placerat ut, porta nec nulla. Vestibulum rhoncus ac ex sit amet fringilla. Nullam gravida purus diam, et dictum felis venenatis efficitur. Aenean ac eleifend lacus, in mollis lectus. Donec sodales, arcu et sollicitudin porttitor, tortor urna tempor ligula, id porttitor mi magna a neque. Donec dui urna, vehicula et sem eget, facilisis sodales sem. | ||
</AccordionBody> | ||
</AccordionItem> | ||
<AccordionItem | ||
disabled | ||
id='QUATRE' | ||
> | ||
<AccordionHeader> | ||
Item disabled | ||
</AccordionHeader> | ||
<AccordionBody> | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque risus mi, tempus quis placerat ut, porta nec nulla. Vestibulum rhoncus ac ex sit amet fringilla. Nullam gravida purus diam, et dictum felis venenatis efficitur. Aenean ac eleifend lacus, in mollis lectus. Donec sodales, arcu et sollicitudin porttitor, tortor urna tempor ligula, id porttitor mi magna a neque. Donec dui urna, vehicula et sem eget, facilisis sodales sem. | ||
</AccordionBody> | ||
</AccordionItem> | ||
</Accordion> | ||
|
||
export default AccordionExample |
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,41 @@ | ||
import React from 'react' | ||
import { Alert } from './index' | ||
import { Columns, ColumnsItem } from '../columns' | ||
|
||
const AlertExample: React.ReactNode = | ||
<Columns multiline> | ||
<ColumnsItem size={6}> | ||
<Alert | ||
status='INFO' | ||
description='Lorem Ipsum is simply dummy text type and scrambled it to make a type specimen book..' | ||
display | ||
title='Alert information' | ||
/> | ||
</ColumnsItem> | ||
<ColumnsItem size={6}> | ||
<Alert | ||
status='ERROR' | ||
description='Lorem Ipsum is simply dummy text type and scrambled it to make a type specimen book..' | ||
display | ||
title='Alert information' | ||
/> | ||
</ColumnsItem> | ||
<ColumnsItem size={6}> | ||
<Alert | ||
status='SUCCESS' | ||
description='Lorem Ipsum is simply dummy text type and scrambled it to make a type specimen book..' | ||
display | ||
title='Alert information' | ||
/> | ||
</ColumnsItem> | ||
<ColumnsItem size={6}> | ||
<Alert | ||
status='WARNING' | ||
description='Lorem Ipsum is simply dummy text type and scrambled it to make a type specimen book..' | ||
display | ||
title='Alert information' | ||
/> | ||
</ColumnsItem> | ||
</Columns> | ||
|
||
export default AlertExample |
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import Alert, { ToasterAlertProvider } from './Alert' | ||
import AlertExample from './Alert.example' | ||
import ToasterContext from './context' | ||
|
||
export { Alert, ToasterContext, ToasterAlertProvider } | ||
export { Alert, AlertExample, ToasterContext, ToasterAlertProvider } |
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
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,10 @@ | ||
import React from 'react' | ||
import { | ||
Badge | ||
} from "./index" | ||
|
||
const BadgeExample: React.ReactNode = <Badge | ||
content={5} | ||
/> | ||
|
||
export default BadgeExample |
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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
import Badge from './Badge' | ||
import BadgeExample from './Badge.example' | ||
|
||
export * from './BadgeEnum' | ||
|
||
export { Badge } | ||
export { Badge, BadgeExample } |
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,49 @@ | ||
import React from 'react' | ||
import { Box, BoxContent, BoxFooter } from './index' | ||
import { Title, TitleLevels } from '@/components/title' | ||
import { Text } from '@/components/text' | ||
import { Columns, ColumnsItem } from '../columns' | ||
import { Link } from '../link' | ||
import { TrilogyColor } from '@/objects' | ||
|
||
const BoxExample: React.ReactNode = ( | ||
<Columns multiline> | ||
<ColumnsItem size={4}> | ||
<Box> | ||
<BoxContent> | ||
<Title level={TitleLevels.ONE}>Box Title</Title> | ||
<Text>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nec iaculis mauris.</Text> | ||
</BoxContent> | ||
</Box> | ||
</ColumnsItem> | ||
<ColumnsItem size={4}> | ||
<Box flat> | ||
<BoxContent> | ||
<Title level={TitleLevels.ONE}>Box Title</Title> | ||
<Text>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nec iaculis mauris.</Text> | ||
</BoxContent> | ||
</Box> | ||
</ColumnsItem> | ||
<ColumnsItem size={4}> | ||
<Box highlighted={TrilogyColor.WARNING}> | ||
<BoxContent> | ||
<Title level={TitleLevels.ONE}>Box Title</Title> | ||
<Text>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nec iaculis mauris.</Text> | ||
</BoxContent> | ||
</Box> | ||
</ColumnsItem> | ||
<ColumnsItem size={12}> | ||
<Box> | ||
<BoxContent> | ||
<Title level={TitleLevels.ONE}>Box Title</Title> | ||
<Text>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nec iaculis mauris.</Text> | ||
</BoxContent> | ||
<BoxFooter> | ||
<Link>Link</Link> | ||
</BoxFooter> | ||
</Box> | ||
</ColumnsItem> | ||
</Columns> | ||
) | ||
|
||
export default BoxExample |
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
20 changes: 20 additions & 0 deletions
20
packages/react/components/breadcrumb/Breadcrumb.example.tsx
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,20 @@ | ||
import React from 'react' | ||
import { Breadcrumb, BreadcrumbItem } from './index' | ||
|
||
const BreadcrumbExample: React.ReactNode = | ||
<Breadcrumb> | ||
<BreadcrumbItem href='https://google.fr'> | ||
</BreadcrumbItem> | ||
<BreadcrumbItem to='#anchor'> | ||
Parent avec ancre | ||
</BreadcrumbItem> | ||
<BreadcrumbItem> | ||
Parent | ||
</BreadcrumbItem> | ||
<BreadcrumbItem active> | ||
Page en cours | ||
</BreadcrumbItem> | ||
</Breadcrumb> | ||
|
||
export default BreadcrumbExample |
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import Breadcrumb from './Breadcrumb' | ||
import BreadcrumbItem from './item' | ||
import BreadcrumbExample from './Breadcrumb.example' | ||
|
||
export { Breadcrumb, BreadcrumbItem } | ||
export { Breadcrumb, BreadcrumbItem, BreadcrumbExample } |
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,36 @@ | ||
import React from 'react' | ||
import { ButtonList, Button } from './index' | ||
|
||
const ButtonExample: React.ReactNode = | ||
<ButtonList> | ||
<Button | ||
variant='CONVERSION' | ||
> | ||
Button | ||
</Button> | ||
<Button | ||
variant='PRIMARY' | ||
> | ||
Button | ||
</Button> | ||
<Button | ||
variant='SECONDARY' | ||
> | ||
Button | ||
</Button> | ||
<Button | ||
disabled | ||
variant='PRIMARY' | ||
> | ||
Button | ||
</Button> | ||
<Button | ||
loading | ||
variant='PRIMARY' | ||
> | ||
Button | ||
</Button> | ||
</ButtonList> | ||
|
||
export default ButtonExample | ||
|
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 |
---|---|---|
@@ -1,6 +1,7 @@ | ||
import Button from './Button' | ||
import { ButtonList } from './list' | ||
import ButtonExample from './Button.example' | ||
|
||
export * from './ButtonEnum' | ||
|
||
export { Button, ButtonList } | ||
export { Button, ButtonList, ButtonExample } |
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,56 @@ | ||
import React from 'react' | ||
import { Card, CardImage, CardContent } from './index' | ||
import { Title, TitleLevels } from '@/components/title' | ||
import { Text, TextLevels } from '@/components/text' | ||
import { Button } from '@/components/button' | ||
import { Rows, RowItem } from '@/components/rows' | ||
|
||
const CardExample: React.ReactNode = | ||
<Rows> | ||
<RowItem> | ||
<Card> | ||
<CardImage src='https://design.bouyguestelecom.fr/v1/card-sample.200bd9f7.png' /> | ||
<CardContent> | ||
<Title> | ||
Présentation | ||
</Title> | ||
<Title level={TitleLevels.ONE}> | ||
Title lorem | ||
</Title> | ||
<Text level={TextLevels.ONE}> | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ligula ex, neque eu, | ||
vulputate vera. | ||
</Text> | ||
<Button | ||
variant='SECONDARY' | ||
> | ||
Voir plus... | ||
</Button> | ||
</CardContent> | ||
</Card> | ||
</RowItem> | ||
<RowItem> | ||
<Card horizontal> | ||
<CardImage src='https://design.bouyguestelecom.fr/v1/card-sample.200bd9f7.png' /> | ||
<CardContent> | ||
<Title> | ||
Présentation | ||
</Title> | ||
<Title level={TitleLevels.ONE}> | ||
Title lorem | ||
</Title> | ||
<Text level={TextLevels.ONE}> | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ligula ex, neque eu, | ||
vulputate vera. | ||
</Text> | ||
<Button | ||
variant='SECONDARY' | ||
> | ||
Voir plus... | ||
</Button> | ||
</CardContent> | ||
</Card> | ||
</RowItem> | ||
</Rows> | ||
|
||
export default CardExample |
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 |
---|---|---|
@@ -1,7 +1,8 @@ | ||
import Card from './Card' | ||
import CardImage from './image' | ||
import CardContent from './content' | ||
import CardExample from './Card.example' | ||
|
||
export * from './image/CardImageEnum' | ||
|
||
export { Card, CardImage, CardContent } | ||
export { Card, CardImage, CardContent, CardExample } |
Oops, something went wrong.