Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
storybook-preset-inline-svg
Advanced tools
A Storybook preset to load SVG files inline using svg-inline-loader
.
First npm install storybook-preset-inline-svg
Then update one of the following files based on your Storybook setup:
.storybook/main.js
module.exports = {
addons: ['storybook-preset-inline-svg']
}
.storybook/presets.js
module.exports = ['storybook-preset-inline-svg']
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
.
None of the options are required. Only use one of include
or exclude
, not both.
svgInlineLoaderOptions
options supported by svg-inline-loaderinclude
sets which files will be inlined. Only RegExp and Function are supported. See Webpack's include.exclude
sets which files will not be inlined. Only RegExp and Function are supported. See Webpack's exclude.For example,
module.exports = {
addons: [
{
name: 'storybook-preset-inline-svg',
options: {
include: /source\/.+\.svg$/,
svgInlineLoaderOptions: {
removeTags: true,
removingTags: ['circle']
}
}
}
]
}
FAQs
Storybook preset to load SVG files inline
The npm package storybook-preset-inline-svg receives a total of 7,967 weekly downloads. As such, storybook-preset-inline-svg popularity was classified as popular.
We found that storybook-preset-inline-svg demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.