-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CPT-2535] Add property to place accordion icon on the left
- Loading branch information
1 parent
36688bf
commit cbbb8e1
Showing
5 changed files
with
71 additions
and
11 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,5 @@ | ||
--- | ||
'@toptal/picasso-accordion': minor | ||
--- | ||
|
||
- add `expandIconPlacement` prop to Picasso Accordion |
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
26 changes: 26 additions & 0 deletions
26
packages/base/Accordion/src/Accordion/story/ExpandIconPlacement.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,26 @@ | ||
import React from 'react' | ||
import { Accordion, Grid } from '@toptal/picasso' | ||
|
||
const Example = () => ( | ||
<Grid> | ||
<Grid.Item sm={6}> | ||
<Accordion | ||
expandIconPlacement='left' | ||
defaultExpanded | ||
content={<DetailsDogDefinitionPanel />} | ||
> | ||
<Accordion.Summary>What is a dog?</Accordion.Summary> | ||
</Accordion> | ||
</Grid.Item> | ||
</Grid> | ||
) | ||
|
||
const DetailsDogDefinitionPanel = () => ( | ||
<Accordion.Details> | ||
A dog is a type of domesticated animal. Known for its loyalty and | ||
faithfulness, it can be found as a welcome guest in many households across | ||
the world. | ||
</Accordion.Details> | ||
) | ||
|
||
export default Example |
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