Skip to content

Commit

Permalink
chore(devenv): load polyfill into Storybook env (carbon-design-system…
Browse files Browse the repository at this point in the history
…#548)

* chore(devenv): load polyfill into Storybook env

Refs carbon-design-system#533.

* docs(polyfills): update README for polyfills
  • Loading branch information
asudoh authored and marijohannessen committed Jan 31, 2018
1 parent 4a91ec8 commit 4aad18b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions .storybook/Container.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component } from 'react';
import './polyfills';
import './_container.scss';

export default class Container extends Component {
Expand Down
4 changes: 4 additions & 0 deletions .storybook/polyfills.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import 'core-js/modules/es7.array.includes';
import 'core-js/modules/es6.array.fill';
import 'core-js/modules/es6.string.includes';
import 'core-js/modules/es6.string.trim';
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ npm install -S carbon-components-react carbon-components carbon-icons

2. Components do not import any of the styles themselves, use the scss or css from `carbon-components` to bring in styling. You can also use the `unpkg` cdn to bring in the styles wholesale - `unpkg.com/carbon-components/css/carbon-components.css` aliases the latest css file.

3. For older browsers (e.g. IE11), polyfills listed in [`carbon-components-react/.storybook/polyfills.js` file](./.storybook/polyfills.js) is required.

## Development

Please refer to the [Contribution Guidelines](CONTRIBUTING.md) before starting any work.
Expand Down

0 comments on commit 4aad18b

Please sign in to comment.