ariel-wine / wix-style-react

Common React UI components for all Wix verticals developing in React

Home Page:https://wix.github.io/wix-style-react/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wix Style - React

'Wix Style' is a common name to the different UX style libraries designed by the UX guild (for dashboard, settings, editor, and viewer). The wix-style-react package contains React implemenations for the different components in the style library.

Demo

Storybook can be seen here.

Getting Started

Storybook

Storybook will allow you to see all the different components implemented, and the different usages of each one of them.

    npm install
    npm start

Using in a Project

Install the npm

    npm install --save wix-style-react

Install watchman

This library depends on watchman, please install it from here

Update webpack

The files are brought 'uncompiled' and 'unpacked'. You will need to make sure webpack standard loaders run on this project by adding 'node_modules/wix-style-react/src' to your loaders' include array, for example:

    {
        test: /\.scss$/,
        include:['node_modules/wix-style-react/src')],
        loaders: [
            'style-loader',
            'css-loader?modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]',
            'postcss-loader',
            'sass-loader'
        ]
    }

Use in your code

Please refer to the specific elements for code-based examples of how to use this library, e.g., Button
For wix-js stack projects no config needed just use import Button from 'wix-style-react/src/Button';

Notes

See the Storybook, and the story fields, for all the elements and the different parameters they receive.

Important: Make sure your body contains either the 'ltr' or 'rtl' class (dependent, of course, on the displayed language).

This project is currently still in initial development. It is advisable to be dependent on a specific version of this component for the time being.

Tests

Please refer the Testing page

Contributing

Please refer the Contribution page

License

This project is offered under MIT License.

About

Common React UI components for all Wix verticals developing in React

https://wix.github.io/wix-style-react/

License:MIT License


Languages

Language:JavaScript 87.1%Language:CSS 12.6%Language:HTML 0.2%