
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@crazyfactory/storybook-props-mock-addon
Advanced tools
It will generate translation based on `translation` prop's keys.
translation
can be mocked for nowIt will generate translation based on translation
prop's keys.
webpack.config.js
loader: path.resolve('./node_modules/@crazyfactory/storybook-props-mock-addon/lib/reactTypescriptTranslationLoader.js')
config.js
import {withMockedTranslation} from "@crazyfactory/storybook-props-mock-addon/lib/withMockedTranslation";
addDecorator(withMockedTranslation());
story files
export const Simple = ({mockedTranslation}) => (
// pass mockedTranslation to translation prop
);
CustomerInfo.tsx
import * as React from "react";
interface IProps {
firstName: string;
lastName: string;
translation: {
firstName: string;
lastName: string;
}
}
export class CustomerInfo extends React.Component<IProps> {
public render(): JSX.Element {
const {firstName, lastName, translation} = this.props;
return (
<div>
<div>
{translation.firstName}: {firstName}
</div>
<div>
{translation.lastName}: {lastName}
</div>
</div>
);
}
}
CustomerInfo.stories.tsx
import * as React from "react";
import {CustomerInfo} from "./CustomerInfo";
export default {
component: CustomerInfo,
title: "CustomerInfo"
}
export const Simple = ({mockedTranslation}) => (
<CustomerInfo firstName={"John"} lastName={"Lee"} translation={mockedTranslation}/>
);
Then run storybook, the addon will generate translation for you by pascalizing translation keys
FAQs
It will generate translation based on `translation` prop's keys.
We found that @crazyfactory/storybook-props-mock-addon demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 10 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
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.