
Research
Malicious fezbox npm Package Steals Browser Passwords from Cookies via Innovative QR Code Steganographic Technique
A malicious package uses a QR code as steganography in an innovative technique.
@jls-digital/storybook-addon-code
Advanced tools
This storybook addon provides the ability to display a panel on stories with any code you want. It's mostly a wrapper for [storybook's syntax highlighter](https://github.com/storybookjs/storybook/tree/main/code/ui/components/src/components/syntaxhighlight
This storybook addon provides the ability to display a panel on stories with any code you want. It's mostly a wrapper for storybook's syntax highlighter , which is a wrapper for prism.js.
Version | Description |
---|---|
2.0.0 | Migrate to support Storybook v9 |
1.0.0 | Initial release |
npm install --save-dev @jls-digital/storybook-addon-code
storybook-addon-code
to your storybook's configsourceCode
parameter to your stories// .storybook/main.ts
const config: StorybookConfig = {
addons: ['@jls-digital/storybook-addon-code'],
};
In your story files, you can now import code as string (with vite by using the
'?raw' query parameter) and pass it to the sourceCode
parameter. You can even
import the file you're currently in:
// button.stories.ts
import rawStories from './button.stories?raw';
import rawComponent from './button?raw';
const meta: Meta<IButtonStory> = {
parameters: {
sourceCode: [
{ name: 'Component', code: rawComponent },
{ name: 'Stories', code: rawStories },
]
},
title: 'Components/Button',
}
Name | Description | Values |
---|---|---|
name | The name of the sub tab. Default: index of tab. | string |
code | The code to display | string |
language | The language of the code that should be used for syntax highlighting. Default: typescript . | "jxextra", "jsx", "json", "yml", "md", "bash", "css", "html", "tsc", "typescript", "graphql" |
(Click on a question to see the answer.)
A: No worries, this is an issue with storybook's TabsState component. You can simply reload the page and it should work fine.
A: Yes, the order is determined by the order of the array you pass to the
sourceCode
parameter.
We encourage you to contribute to this project! Please check out the Contributing guide for guidelines about how to proceed and how to set up your dev environment. Join us!
Storybook-Addon-Code is released under the MIT License.
FAQs
This storybook addon provides the ability to display a panel on stories with any code you want. It's mostly a wrapper for [storybook's syntax highlighter](https://github.com/storybookjs/storybook/tree/main/code/ui/components/src/components/syntaxhighlight
The npm package @jls-digital/storybook-addon-code receives a total of 236 weekly downloads. As such, @jls-digital/storybook-addon-code popularity was classified as not popular.
We found that @jls-digital/storybook-addon-code demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers 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.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.
Application Security
/Research
/Security News
Socket detected multiple compromised CrowdStrike npm packages, continuing the "Shai-Hulud" supply chain attack that has now impacted nearly 500 packages.