Skip to content

Commit

Permalink
feat(icon-build-helpers): add module-info extension and next react bu…
Browse files Browse the repository at this point in the history
…ilder (#8189)

* feat(icon-build-helpers): add module-info extension and next react builder

* chore(icons): add next.json to .gitignore

* chore(icons-react): update storybook to work with yarn 2

* feat(icons-react): update builder to work with v11 icons

* chore(icons-react): ignore yarn install files

* chore(icon-build-helpers): update package.json deps

* chore(project): run yarn dedupe

* chore(project): move deps from icons-react to icon-build-helpers

* chore(icons): remove unused gitignore

* Apply suggestions from code review

* Update packages/icon-build-helpers/src/builders/react/next.js

* feat(icon-build-helpers): accept number or string for height and width props

* fix(icon-build-helpers): add more checks for component sizes

* fix(icons-react): update builder to emit entrypoints for CommonJS and ESM

* fix(icons-react): re-enable classic builder
  • Loading branch information
joshblack authored Apr 5, 2021
1 parent e972912 commit f63086e
Show file tree
Hide file tree
Showing 25 changed files with 11,509 additions and 7,828 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
8 changes: 5 additions & 3 deletions packages/icon-build-helpers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@
"publishConfig": {
"access": "public"
},
"dependencies": {
"@babel/core": "^7.12.13"
},
"devDependencies": {
"@babel/core": "^7.12.13",
"@babel/generator": "^7.13.9",
"@babel/preset-env": "^7.10.0",
"@babel/preset-react": "^7.10.0",
"@babel/template": "^7.12.13",
"@babel/types": "^7.13.14",
"@carbon/cli-reporter": "^10.4.0",
"@carbon/icon-helpers": "^10.15.0",
"@rollup/plugin-babel": "^5.2.2",
Expand All @@ -46,6 +47,7 @@
"rimraf": "^3.0.0",
"rollup": "^2.38.0",
"rollup-plugin-strip-banner": "^2.0.0",
"svg-parser": "^2.0.4",
"svgo": "^1.1.1"
}
}
4 changes: 4 additions & 0 deletions packages/icon-build-helpers/src/builders/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
'use strict';

const react = require('./react/builder');
const reactNext = require('./react/next');
const svg = require('./svg');
const vanilla = require('./vanilla');
const vue = require('./vue/builder');
Expand All @@ -16,6 +17,9 @@ const builders = {
react: {
run: react,
},
reactNext: {
run: reactNext,
},
svg: {
run: svg,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/

import { getAttributes } from '@carbon/icon-helpers';
import PropTypes from 'prop-types';
import React from 'react';
Expand Down Expand Up @@ -40,11 +39,11 @@ Icon.propTypes = {
'aria-labelledby': PropTypes.string,
children: PropTypes.node,
className: PropTypes.string,
height: PropTypes.number,
height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
preserveAspectRatio: PropTypes.string,
tabIndex: PropTypes.string,
viewBox: PropTypes.string,
width: PropTypes.number,
width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
xmlns: PropTypes.string,
};
Icon.defaultProps = {
Expand Down
Loading

0 comments on commit f63086e

Please sign in to comment.