
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
storybook-addon-intl
Advanced tools
Addon to provide locale switcher and react-intl for storybook
The Intl addon can be used to provide locale switcher and react-intl.
First, install the addon
npm install -D storybook-addon-intl
Then, add following content to .storybook/main.js
:
export default {
addons: ['storybook-addon-intl']
};
In .storybook/preview.js
, add the following:
// Provide your messages
const messages = {
en: { message: 'Just some text.' },
de: { message: 'Nur etwas Text.' },
es: { message: 'Sólo un texto.' }
};
const getMessages = (locale) => messages[locale];
export default {
parameters: {
intl: {
locales: defaultLocales,
defaultLocale: 'en',
getMessages
}
}
};
Parameter key: intl
locales
Type: string[]
Available locales.
defaultLocale
Type: string
Fallback locale.
getMessages
Type: (locale: string) => object
Getter function that takes the active locale as arguments and expects an object
of messages as a return value.
(See messages
in IntlProvider
docs of react-intl)
getFormats
Type: (locale: string) => object
Getter function that takes the active locale as arguments and expects an object
of formats as a return value.
(See formats
in IntlProvider
docs of react-intl)
defaultRichTextElements
Type: object
Object of rich text elements.
(See defaultRichTextElements
in IntlProvider
docs of react-intl)
FAQs
Addon to provide locale switcher and react-intl for storybook
The npm package storybook-addon-intl receives a total of 9,069 weekly downloads. As such, storybook-addon-intl popularity was classified as popular.
We found that storybook-addon-intl demonstrated a healthy version release cadence and project activity because the last version was released less than 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
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.