Skip to content

Latest commit

 

History

History
40 lines (28 loc) · 1.07 KB

ICONS.md

File metadata and controls

40 lines (28 loc) · 1.07 KB

Using icons from wix-ui-icons-common package

How to migrate

Make sure you have wix-ui-icons-common package installed:

npm i wix-ui-icons-common
# or
yarn add wix-ui-icons-common

Then use our provided codemod or manually replace all icon imports with the following pattern:

- import Add from 'wix-style-react/new-icons/Add';
+ import Add from 'wix-ui-icons-common/Add';

To use codemod, run the following command (where the last argument is the directory or file for source code you want to transform):

npx wix-ui-codemod wix-style-react/icons-common src/

Please see README.md file for more details on how to use the provided codemod.

Using icons in your code

The icons from wix-ui-icons-common support all the same features as the old wix-style-react/new-icons icons. They are backwards compatible and their usage is the same:

import Add from 'wix-ui-icons-common/Add';

export default () => (
  <div>
    <Add />
  </div>
);