Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
addons.register(ADDON_ID, api => {
addons.add(PANEL_ID, {
type: types.TOOL,
title: 'Coverage',
match: ({ viewMode }) => viewMode === 'story', // todo add type
render: () => ,
});
addons.add(PANEL_ID, {
type: types.PANEL,
title: 'Coverage',
match: ({ viewMode }) => viewMode === 'story', // todo add type
render: ({ active, key }) => (
),
paramKey: PARAM_KEY,
});
addons.register('responsive-addon', (api) => {
addons.addPanel('responsive-addon/panel', {
title: 'Responsive Views',
type: types.TOOL,
match: ({ viewMode }) => viewMode === 'story',
// eslint-disable-next-line react/display-name
render: () => ,
})
})
(getElements, panels, actions, options, storyId, viewMode, location, path, baseUrl) => {
const tools = getElementList(getElements, types.TOOL, [
panels.filter(p => p.id !== 'canvas').length
? {
render: () => (
{panels.map((t, index) => {
const to = t.route({ storyId, viewMode, path, location });
const isActive = t.match({ storyId, viewMode, path, location });
return (
{t.title}
);
})}
),
}
addons.register(ADDON_ID, api => {
addons.add(PANEL_ID, {
title: '',
type: types.TOOL,
match: ({ viewMode }) => viewMode === 'story',
render: () => ,
});
addons.add(PANEL_ID, {
title: 'Accessibility',
type: types.PANEL,
render: ({ active, key }) => ,
paramKey: PARAM_KEY,
});
addons.add(PANEL_ID, {
title: '',
type: types.PREVIEW,
render: PreviewWrapper as any,
});
addons.register(ADDON_ID, api => {
addons.add(ADDON_ID, {
title: 'Backgrounds',
type: types.TOOL,
match: ({ viewMode }) => viewMode === 'story',
render: () => ,
});
});
addons.register(ADDON_ID, api => {
addons.add(PANEL_ID, {
title: '',
type: types.TOOL,
match: ({ viewMode }) => viewMode === 'story',
render: () => ,
});
addons.add(PANEL_ID, {
title: 'Accessibility',
type: types.PANEL,
render: ({ active, key }) => ,
});
addons.add(PANEL_ID, {
title: '',
type: types.PREVIEW,
render: PreviewWrapper as any,
});
});
addons.register(ADDON_ID, api => {
addons.add(ADDON_ID, {
title: 'viewport / media-queries',
type: types.TOOL,
match: ({ viewMode }) => viewMode === 'story',
render: () => ,
});
});
addons.register(ID, api =>
addons.add(ID, {
title: ID,
type: types.TOOL,
match: ({ viewMode }) => viewMode === 'story',
render: () => createElement(ContextsManager, { api }),
})
);
(
getElements,
queryParams,
panels,
api,
options,
storyId,
viewMode = 'story',
location,
path,
currentUrl
) => {
const tools = getElementList(getElements, types.TOOL, [
panels.filter((p: Panel) => p.id !== 'canvas').length
? {
render: () => (
{panels.map((t: Panel, index: any) => {
const to = t.route({ storyId, viewMode, path, location });
const isActive = path === to;
return (
{t.title}
);
})}
(
getElements,
queryParams,
panels,
api,
options,
storyId,
viewMode,
docsOnly,
location,
path,
baseUrl
) => {
const tools = getElementList(getElements, types.TOOL, [
panels.filter(p => p.id !== 'canvas').length
? {
render: () => (
{panels.map((t, index) => {
const to = t.route({ storyId, viewMode, path, location });
const isActive = path === to;
return (
{t.title}
);
})}