Skip to content

Commit

Permalink
docs(Icon): removes string as a icon type (#4034)
Browse files Browse the repository at this point in the history
Removes string as a icon type, as Icon's type property only accepts
React SVG Components.

It exists own docs for IconPrimary, so not sure if we have to mention
string(a type only used in IconPrimary in the Icon component):
https://eufemia.dnb.no/uilib/components/icon-primary/properties/
  • Loading branch information
langz authored Sep 30, 2024
1 parent 55cf0a4 commit 4c53199
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ showTabs: true

| Properties | Description |
| --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `icon` | _(required)_ a React SVG Component or the icon name (in case we use `IconPrimary` or `dnb-icon-primary`). |
| `icon` | _(required)_ a React SVG Component. |
| `title` | _(optional)_ Use a title to provide extra information about the icon used. |
| `border` | _(optional)_ use `true` to display a rounded border with an inherited color. Keep in mind that the icon will have a larger total width and height of `+0.5em`. |
| `alt` | _(optional)_ the alternative label (text version) of the icon. Defaults to the imported icon name. |
Expand Down
2 changes: 1 addition & 1 deletion packages/dnb-eufemia/src/components/icon/Icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export type IconColor =

export type IconProps = {
/**
* A React SVG Component or the icon name (in case we use `IconPrimary` or `dnb-icon-primary`).
* A React SVG Component.
*/
icon?: IconIcon

Expand Down

0 comments on commit 4c53199

Please sign in to comment.