File tree Expand file tree Collapse file tree 2 files changed +9
-12
lines changed
Expand file tree Collapse file tree 2 files changed +9
-12
lines changed Original file line number Diff line number Diff line change 1- import { addons } from " storybook/manager-api" ;
1+ import { addons } from ' storybook/manager-api' ;
22
3- import { renderLabel } from " ../dist /manager-helpers.js" ;
3+ import { renderLabel } from ' ../src /manager-helpers' ;
44
55/*
66 * This is an example of opt-in usage of addon exports. Your users can choose to
Original file line number Diff line number Diff line change 1- import React from " react" ;
2- import type { API_HashEntry } from 'storybook/internal/types'
3- import { ADDON_ID } from " ./constants" ;
1+ import React from ' react' ;
2+ import type { API_HashEntry } from 'storybook/internal/types' ;
3+ import { ADDON_ID } from ' ./constants' ;
44
55/**
66 * This opt-in helper can be manually imported by your users who want to
77 * use it, and ignored by those who don't.
88 */
99export function renderLabel ( item : API_HashEntry ) {
10- if (
11- item . type !== 'story' &&
12- item . type !== 'docs'
13- ) {
14- return
10+ if ( item . type !== 'story' && item . type !== 'docs' ) {
11+ return ;
1512 }
1613
1714 if ( item . title . startsWith ( ADDON_ID ) ) {
18- return < span > 🌟 { item . name } </ span >
15+ return < span > 🌟 { item . name } </ span > ;
1916 }
20- }
17+ }
You can’t perform that action at this time.
0 commit comments