
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@storybook/native-addon
Advanced tools
This module contains an addon that can be used to interact with the appetize.io emulator. Currently, it lets you rotate the emulator left or right, take screenshots, and change the device that is being emulated.
This module contains an addon that can be used to interact with the appetize.io emulator.
Currently, it lets you rotate the emulator left or right, take screenshots, and change the device that is being emulated.
npm install @storybook/native-addon
or
yarn add @storybook/native-addon
Add "@storybook/native-addon/dist/register.js"
to the addons section of your main.js
file.
Add the following to your preview.js
file:
import { DeviceDecorator } from "@storybook/native-addon";
export const decorators = [DeviceDecorator];
An example main.js can be found here.
An example preview.js can be found here.
If you want to use the network logs panel you need to a config the previewHead
of your storybook ,
it will make sure that the Appetize SDK is fetched and setup
Update your main.js
file with the following code:
import { nativePreviewHead } from "@storybook/native";
const config = {
stories: ["../stories/*.stories.jsx"],
framework: {
name: "@storybook/react-webpack5",
options: {},
},
addons: [
"@storybook/addon-docs",
"@storybook/addon-controls",
"@storybook/native-addon/dist/register.js"
],
docs: {
autodocs: true
},
previewHead: nativePreviewHead,
};
export default config;
If you want to use the map addon panel you need to a global Google map api key, You can get one here
After you get the api key you can update the preview.js
file with the following code:
const preview = {
globalTypes: {
location: {
description: 'Device Location',
defaultValue: getGlobalLocationJson(
{
googleMapsApiKey: "<you-api-key>"
}
)
},
},
decorators: [DeviceDecorator]
};
export default preview;
FAQs
This module contains an addon that can be used to interact with the appetize.io emulator. Currently, it lets you rotate the emulator left or right, take screenshots, and change the device that is being emulated.
The npm package @storybook/native-addon receives a total of 119 weekly downloads. As such, @storybook/native-addon popularity was classified as not popular.
We found that @storybook/native-addon 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.