UNPKG

@storybook/addon-ondevice-backgrounds

Version:

A react-native storybook addon to show different backgrounds for your preview

14 lines (13 loc) 520 B
import { jsx as _jsx } from "react/jsx-runtime"; import { addons, types } from 'storybook/manager-api'; import BackgroundPanel from './BackgroundPanel'; import { ADDON_ID, PANEL_ID, PARAM_KEY } from './constants'; addons.register(ADDON_ID, (api) => { const channel = addons.getChannel(); addons.add(PANEL_ID, { type: types.PANEL, title: 'Backgrounds', render: ({ active }) => _jsx(BackgroundPanel, { channel: channel, api: api, active: active }), paramKey: PARAM_KEY, }); });