-
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.
feat(OverviewBlock): add custom label (#3650)
* feat(OverviewBlock): add custom label * chore: add changeset * test(OverviewBlock): wrap test with a describe function * chore: update changeset message
- Loading branch information
1 parent
f72284a
commit 7da746c
Showing
5 changed files
with
52 additions
and
6 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,7 @@ | ||
--- | ||
'@toptal/picasso': minor | ||
--- | ||
|
||
### OverviewBlock | ||
|
||
- it allows to use custom labels on `OverviewBlock` |
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
21 changes: 21 additions & 0 deletions
21
packages/picasso/src/OverviewBlock/story/CustomLabel.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,21 @@ | ||
import React from 'react' | ||
import { Typography, OverviewBlock, Tooltip } from '@toptal/picasso' | ||
|
||
const customLabel = ( | ||
<Tooltip content='You inside the tooltip!' placement='top'> | ||
<Typography size='xxsmall' weight='semibold'> | ||
Custom Label with Tooltip | ||
</Typography> | ||
</Tooltip> | ||
) | ||
|
||
const CustomLabel = () => { | ||
return ( | ||
<OverviewBlock.Group> | ||
<OverviewBlock value='4249' label={customLabel} /> | ||
<OverviewBlock value='19302' label='Standard Label' /> | ||
</OverviewBlock.Group> | ||
) | ||
} | ||
|
||
export default CustomLabel |
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