Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
storybook-addon-rtl-direction
Advanced tools
A Storybook tool add-on to toggle html dir attribute between LTR and RTL.
A Storybook tool add-on to toggle html dir attribute between LTR and RTL.
dir="ltr"
or dir="rtl"
style will be added to html
tag with LTR/RTL
icon in tool section.npm i --save-dev storybook-addon-rtl-direction
Add it to .storybook/main.js
module.exports = {
addons: ["storybook-addon-rtl-direction"],
};
You can sync with locale to set default direction.
// preview.js
export const globalTypes = {
locale: {
name: "Locale",
description: "Internationalization locale",
defaultValue: "en",
toolbar: {
icon: "globe",
items: [
{ value: "en-US", right: "LTR", title: "English (United States)" },
{ value: "es", right: "LTR", title: "Spanish" },
{ value: "ar", right: "RTL", title: "Arabic" },
{ value: "ar-OM", right: "RTL", title: "Arabic (Oman)" },
{ value: "pa-IN", right: "LTR", title: "Punjabi (India)" },
{ value: "pa-PK", right: "RTL", title: "Punjabi (Pakistan)" },
],
},
},
};
export const parameters = {
rtlDirection: {
// Collection to set as RTL (You can add language or with add country code specifically)
autoLocales: ["ar", "pa-PK"],
// Condition to reload the page each time locale is updated
reload: true,
},
};
https://user-images.githubusercontent.com/588874/194731628-07124805-cc11-4acb-bb45-0aa24d53c625.mov
FAQs
A Storybook tool add-on to toggle html dir attribute between LTR and RTL.
We found that storybook-addon-rtl-direction 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.