-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
revert(Deps): Resolve security alerts and update SVGR
This is being reverted while investigating a possible performance regression in Netlify Storybook builds.
- Loading branch information
Showing
7 changed files
with
2,394 additions
and
1,822 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,23 @@ | ||
module.exports = { | ||
typescript: true, | ||
prettierConfig: { | ||
...require('./prettier.config.js'), | ||
parser: 'typescript', | ||
}, | ||
template: (variables, { tpl }) => { | ||
return tpl` | ||
import React from 'react' | ||
import { SVGUniqueID } from 'react-svg-unique-id' | ||
import { SVGIconProps } from '../types' | ||
${variables.interfaces} | ||
template( | ||
{ template }, | ||
opts, | ||
{ imports, componentName, props, jsx, exports } | ||
) { | ||
const typeScriptTpl = template.smart({ plugins: ['jsx', 'typescript'] }) | ||
return typeScriptTpl.ast` | ||
import React from 'react' | ||
import { SVGUniqueID } from 'react-svg-unique-id'; | ||
import { SVGIconProps } from '../types' | ||
const ${variables.componentName} = ({ size = 16, ...props }: SVGIconProps) => ( | ||
<SVGUniqueID>{${variables.jsx}}</SVGUniqueID> | ||
); | ||
const ${componentName} = ({ size = 16, ...props }: SVGIconProps) => ( | ||
<SVGUniqueID>{${jsx}}</SVGUniqueID> | ||
); | ||
${variables.exports} | ||
` | ||
export default ${componentName}; | ||
` | ||
}, | ||
svgoConfig: { | ||
plugins: [{ removeViewBox: false }], | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.