storybook-preset-inline-svg
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "storybook-preset-inline-svg", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Storybook preset to load SVG files inline", | ||
@@ -18,2 +18,3 @@ "main": "dist", | ||
"storybook", | ||
"preset", | ||
"svg", | ||
@@ -20,0 +21,0 @@ "inline" |
@@ -1,2 +0,2 @@ | ||
# Storybook Preset Inline SVG | ||
# storybook-preset-inline-svg | ||
@@ -6,3 +6,3 @@ A [Storybook preset](https://storybook.js.org/docs/react/addons/writing-presets) to load SVG files inline using `svg-inline-loader`. | ||
## Basic Usage | ||
First `npm install storybook-preset-inline-svg` | ||
First `npm install storybook-preset-inline-svg svg-inline-loader` | ||
@@ -27,9 +27,9 @@ Then update one of the following files based on your Storybook setup: | ||
By default this preset will inline **all** SVG files. You can use these options to filter which SVG files are inlined or to pass options along to `svg-inline-loader`. | ||
By default this preset will inline ***all*** SVG files. Use options to filter which SVG files are inlined, or to pass options along to `svg-inline-loader`. | ||
None of the options are required. Only use one of `include` or `exclude`, not both. | ||
None of the options are required. Only use one of `include` or `exclude`, not both, which can be a `RegExp` or `Function`. | ||
* `svgInlineLoaderOptions` options supported by [svg-inline-loader](https://www.npmjs.com/package/svg-inline-loader) | ||
* `include` sets which files will be inlined. Only RegExp and Function are supported. See Webpack's [include](https://webpack.js.org/configuration/module/#ruleinclude). | ||
* `exclude` sets which files will not be inlined. Only RegExp and Function are supported. See Webpack's [exclude](https://webpack.js.org/configuration/module/#ruleexclude). | ||
* `include` files to be inlined using [include](https://webpack.js.org/configuration/module/#ruleinclude) | ||
* `exclude` files from being inlined using [exclude](https://webpack.js.org/configuration/module/#ruleexclude) | ||
@@ -36,0 +36,0 @@ For example, |
3497