Skip to content

Commit

Permalink
fixup! Docs(web-react): Add IconsProvider documentation #DS-815
Browse files Browse the repository at this point in the history
  • Loading branch information
curdaj committed Dec 10, 2024
1 parent e39d475 commit 653da84
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions packages/web-react/src/components/Icon/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,17 @@ So it will not be automatically installed with `@lmc-eu/spirit-web-react`.
To ensure the `Icon` component functions as expected, wrap your application or the component tree where Icon is used with the `IconsProvider`.
You need to pass the icon set to the provider as its value.

import { IconsProvider } from '@lmc-eu/spirit-web-react/components';
import icons from '@lmc-eu/spirit-icons/icons';

```jsx
import { Icon, IconsProvider } from '@lmc-eu/spirit-web-react/components';
import { Icon, IconsProvider } from '@lmc-eu/spirit-web-react';
import icons from '@lmc-eu/spirit-icons/icons';

<IconsProvider value={icons}>{/* Your app or component with Icon */}</IconsProvider>;
<IconsProvider value={icons}>{/* Your Icon, app or component where Icon is used */}</IconsProvider>;
```

### Example

```jsx
import { Icon, IconsProvider } from '@lmc-eu/spirit-web-react/components';
import { Icon, IconsProvider } from '@lmc-eu/spirit-web-react';
import icons from '@lmc-eu/spirit-icons/icons';

<IconsProvider value={icons}>
Expand Down

0 comments on commit 653da84

Please sign in to comment.