How to use the @storybook/addon-notes.withNotes function in @storybook/addon-notes

To help you get started, we’ve selected a few @storybook/addon-notes examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github holochain / holochain-ui / ui-src / src / hApps / holo-vault / components / profile / profile.stories.tsx View on Github external
import { specs } from 'storybook-addon-specifications'
import { withNotes } from '@storybook/addon-notes'
import Profile, { Props } from './profile'
import profileNotMappedNoDefaults from './profileNotMappedNoDefaults.md'
import profileNotMappedNoDefaultsManualMap from './profileNotMappedNoDefaultsManualMap.md'
import profileNotMappedHasDefaults from './profileNotMappedHasDefaults.md'
import profileMapped from './profileMapped.md'
import profileFaultyMapping from './profileFaultyMapping.md'
import { profileTests } from './profile.test'
import * as constants from '../../constants'

const mockFn = jest.fn()
const mockPromise = jest.fn(() => Promise.reject('Storybook mock function'))

storiesOf('HoloVault/Profile', module)
  .add('Not mapped no defaults', withNotes(profileNotMappedNoDefaults)(() => {
    // specs(() => profileTests)
    let props: Props
    props = {
      personas: constants.personas,
      selectedPersona: constants.personas[0],
      profile: constants.exampleProfileNotMappedNoDefaultsManualMap,
      save: jest.fn(() => Promise.resolve('')),
      getProfiles: mockPromise,
      getPersonas: mockPromise,
      setCurrentPersona: mockFn
    }
    return 
  }))
  .add('Not mapped no defaults manual mapping', withNotes(profileNotMappedNoDefaultsManualMap)(() => {
    // specs(() => profileTests)
    let props: Props
github syndesisio / syndesis / app / ui-react / packages / ui / stories / Data / Virtualizations / VirtualizationList.stories.tsx View on Github external
'i18nNameFilterPlaceholder',
            'Filter by Name...'
          )}
          i18nResultsCount={text('i18nResultsCount', '0 Results')}
          /* TD-636: Commented out for TP 
          onImport={action(importText)} */
          children={[]}
          hasListData={false}
        />
      
    ))
  )

  .add(
    '3 virtualizations',
    withNotes(threeVirtualizationsTestNotes)(() => (
github syndesisio / syndesis / app / ui-react / packages / ui / stories / Data / Views / ViewInfoList.stories.tsx View on Github external
i18nEmptyStateTitle={text('i18nEmptyStateTitle', emptyStateTitle)}
          i18nName={text('i18nName', 'Name')}
          i18nNameFilterPlaceholder={text(
            'i18nNameFilterPlaceholder',
            'Filter by Name...'
          )}
          i18nResultsCount={text('i18nResultsCount', '0 Results')}
          children={[]}
        />
      
    ))
  )

  .add(
    'has Source Tables',
    withNotes(hasSourceTablesTestNotes)(() => (
github syndesisio / syndesis / packages / ui / stories / Data / Views / ViewListItem.stories.tsx View on Github external
editActionText +
  '" in the ACTION LOGGER' +
  '"\n' +
  '- Verify the kebab menu contains action "' +
  deleteText +
  '"\n' +
  '- Verify the delete action tooltip is "' +
  deleteTip +
  '"\n' +
  '- Verify selecting Delete in the kebab menu prints "' +
  deleteActionText +
  '" in the ACTION LOGGER';

stories.add(
  'sample view item',
  withNotes(sampleViewNotes)(() => (
    
  ))
);
github GSS-FED / vital-ui-kit-react / stories / examples / Pagination.stories.jsx View on Github external
{
    text: 'Dashboard',
    current: true,
  },
  { text: 'Projects', badge: '23' },
  { text: 'Issues', badge: '99+' },
  { text: 'Reports', badge: '6' },
  { text: 'User Center' },
];

storiesOf('Packages | Pagination', module)
  .addDecorator(withKnobs)
  .add(
    'Basic',
    withInfo(`info`)(
      withNotes('This is Pagination')(() => (
        
      )),
    ),
  );
github holochain / holochain-ui / ui-src / src / hApps / holo-chat / components / streams / newStreams.stories.tsx View on Github external
import newStream from './newStream.md'
import { agentListTest } from './agentList.test'

storiesOf('HoloChat/Streams', module)
  .addDecorator(story => (
    {story()}
  ))
  .add('New Public Stream', withNotes(newChat)(() => {
    specs(() => newChatTests)
    return  Promise.resolve('Get Members'))} />
  }))
  .add('New Direct Message', withNotes(newChat)(() => {
    specs(() => newChatTests)
    return  Promise.resolve('Get Members'))} />
  }))
  .add('Filterable/Selectable list of members', withNotes(newStream)(() => {
    specs(() => agentListTest)
    return  Promise.resolve('Get Members'))} />
  }))
github frontend-collective / react-isometric-grid / examples / storybooks / index.js View on Github external
)
  .add(
    'Basic Stack with Title',
    withNotes('A basic 3d vertical stack animation and title prop')(() =>
      wrapWithSource(, 'basic-stack-with-title.js')
    )
  )
  .add(
    'Spread',
    withNotes(
      'A spread animation to showcase a bunch of photos that are stacked togther. Using layerStyles'
    )(() => wrapWithSource(, 'spread.js'))
  )
  .add(
    'Side Stack',
    withNotes(
      'Using the transform property of react-isometric-grid to display a bookshelf like grid that opens sideways. Using transform, perspective and animationOptions'
    )(() => wrapWithSource(, 'side-stack.js'))
  );

storiesOf('Advanced', module).add(
  'onGridLoaded Callback',
  withNotes(
    'Using the onGridLoaded callback to wait to display the grid until all images are loaded'
  )(() => wrapWithSource(, 'loaded-callback.js'))
);
github GSS-FED / vital-ui-kit-react / stories / examples / Checkbox.stories.tsx View on Github external
.add(
    'Basic',
    withInfo()(
      withNotes('This is checkbox')(() => (
        
      )),
    ),
  )
  .add(
    'Custom Icon',
    withInfo()(
      withNotes('This is checkbox')(() => (
        
      )),
    ),
  )
  .add(
    'CheckboxGroup',
    withInfo()(
      withNotes('Checkgroup')(() => (
github syndesisio / syndesis / app / ui-react / packages / ui / stories / Data / Views / ViewInfoListItem.stories.tsx View on Github external
const viewName = 'Customers';
const viewDesc = 'Description for Customers';
const selectionChangedActionText = 'Selection changed for view ' + viewName;

const sampleSourceTableNotes =
  '- Verify view icon is showing on the left\n' +
  '- Verify view name is "' +
  viewName +
  '"\n' +
  '- Verify view description is "' +
  viewDesc +
  '"';

stories.add(
  'sample source table item',
  withNotes(sampleSourceTableNotes)(() => (
    
  ))
);
github syndesisio / syndesis / packages / ui / stories / Customization / CustomizationsApiConnectorDetail.stories.tsx View on Github external
import { CustomizationsApiConnectorDetail } from '../../src';

export const apiConnectorDetailsStory = 'story-tbd';

const stories = storiesOf(
  'Customization/CustomizationsApiConnectorDetail',
  module
);

const storyNotes = '- Verify something here';

stories
  .addDecorator(story => {story()})
  .add(
    apiConnectorDetailsStory,
    withNotes(storyNotes)(() => (
      
    ))
  );

@storybook/addon-notes

Write notes for your Storybook stories.

MIT
Latest version published 4 years ago

Package Health Score

72 / 100
Full package analysis