Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(Button): allow using disabled inside Button.Group
- Loading branch information
Showing
8 changed files
with
113 additions
and
50 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
21 changes: 0 additions & 21 deletions
21
packages/picasso/src/Button/story/DisabledWithEvents.example.tsx
This file was deleted.
Oops, something went wrong.
34 changes: 34 additions & 0 deletions
34
packages/picasso/src/Button/story/DisabledWithTooltip.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,34 @@ | ||
import React from 'react' | ||
import { Container, Button, Tooltip } from '@toptal/picasso' | ||
import { useNotifications } from '@toptal/picasso/utils' | ||
|
||
const Example = () => { | ||
const { showSuccess } = useNotifications() | ||
const handleClick = () => showSuccess('I was clicked') | ||
|
||
return ( | ||
<div> | ||
<Container> | ||
<Button onClick={handleClick}>Enabled</Button> | ||
<Tooltip content='Action is disabled'> | ||
<Button disabled onClick={handleClick}> | ||
Disabled With Tooltip | ||
</Button> | ||
</Tooltip> | ||
</Container> | ||
|
||
<Container top='small'> | ||
<Button.Group> | ||
<Button onClick={handleClick}>Enabled</Button> | ||
<Tooltip content='Action is disabled'> | ||
<Button disabled onClick={handleClick}> | ||
Disabled With Tooltip | ||
</Button> | ||
</Tooltip> | ||
</Button.Group> | ||
</Container> | ||
</div> | ||
) | ||
} | ||
|
||
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
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