-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
It wasn't possible to use Comet icons as children of tooltips. This was due to missing ref-forwarding.
- Loading branch information
1 parent
8e20c88
commit 08e0da0
Showing
5 changed files
with
28 additions
and
5 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 @@ | ||
--- | ||
"@comet/admin-icons": patch | ||
--- | ||
|
||
Fix icons inside tooltips by forwarding the ref |
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
14 changes: 14 additions & 0 deletions
14
packages/admin/admin-stories/src/admin/tooltip/IconWithTooltip.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,14 @@ | ||
import { Tooltip } from "@comet/admin"; | ||
import { Add } from "@comet/admin-icons"; | ||
import { storiesOf } from "@storybook/react"; | ||
import * as React from "react"; | ||
|
||
storiesOf("@comet/admin", module).add("Icon with Tooltip", () => { | ||
return ( | ||
<> | ||
<Tooltip title="Add something"> | ||
<Add /> | ||
</Tooltip> | ||
</> | ||
); | ||
}); |
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