Example project demonstrating the use of React Flag Icon Css with React Css Modules, standard Css and custom flags. Powered by Webpack 2.
It is recommended to use Yarn instead of npm for managing packages.
Clone the repository:
$ git clone https://github.com/matteocng/react-flag-icon-css-example-multi.git && cd react-flag-icon-css-example-multi
Install the required modules:
$ yarnRun the Webpack development server and apply the configuration for React Css Modules:
$ yarn start... or use standard Css:
$ yarn start:classesOpen a browser and go here: http://localhost:8080.
This example project uses the USE_CSS_MODULES environment variable (set by the package.json scripts) to allow for an easy "switch" between a configuration with or without React Css Modules. This results in more complex code than need be.
In a real project you would probably choose to either go with React Css Modules or standard Css, removing the USE_CSS_MODULES switch and getStylePropName, replacing [options.stylePropName] in the React components with either className (standard Css) or styleName (modules).
Contributions are welcome. Please use a topic branch, follow the AngularJS commit style guidelines and check that yarn run pre-commit returns zero errors before opening a PR. Thanks!
This project is licensed under the terms of the MIT license.