feat: OHIF-v3 UI Component Library (#2653)

* wip on storybook as a replacement for using UI components in docusaurus, since it causes too many problems

* fix: storybook webpack config

* feat: add more stories

* feat: add more stories

* feat: add more stories

* feat: fix logo and babel runtime error

* feat: move to mdx docs for ui

* feat: enhanced mdx for header and styles

* feat: Add button usecases

* feat: Add buttonGroup docs

* feat: Add docs and use case to cine and contex menu

* feat: fix decorators

* feat: add header and dropdown docs

* feat: add Icon and input docs

* feat: add more docs

* feat: add more stories

* fix: feedback section

* feat: Add doc page

* feat: Add typography and color stories

* yarn lock

* add analytics to v3-ui

* new banner image

* new viewport component

* update review comments
This commit is contained in:
Alireza authored and GitHub committed 2022-02-10 14:08:34 -05:00
1 parent eb77cb76b6
commit 5c8ee7f906
79 files changed
+9004 -2915

No files matched your search

@@ -0,0 +1,75 @@
import SplitButton from '../SplitButton';
import { ArgsTable, Story, Canvas, Meta } from '@storybook/addon-docs';
import { createComponentTemplate } from '../../../storybook/functions/create-component-story';
export const argTypes = {
component: SplitButton,
title: 'Components/SplitButton',
};
<Meta title="Components/SplitButton" component={SplitButton} />
export const SplitButtonTemplate = (args) => (
<div className="h-32 bg-primary-dark">
<SplitButton {...args} />
</div>
);
<Heading
title="SplitButton"
componentRelativePath="SplitButton/SplitButton.jsx"
/>
- [Overview](#overview)
- [Props](#props)
- [Contribute](#contribute)
## Overview
SplitButton is a component that renders the SplitButtons.
<Canvas>
<Story
name="Overview"
args={{
primary: {
id: 'Length',
icon: 'tool-length',
label: 'Length',
type: 'tool',
commandName: undefined,
commandOptions: { toolName: 'Length' },
tooltip: 'Length',
},
bState: {},
secondary: {
icon: 'chevron-down',
label: '',
isActive: true,
tooltip: 'More Measure Tools',
},
items: [
{
id: 'Bidirectional',
icon: 'tool-bidirectional',
label: 'Bidirectional',
type: 'tool',
commandName: undefined,
commandOptions: { toolName: 'Bidirectional' },
tooltip: 'Bidirectional',
},
],
}}
>
{SplitButtonTemplate.bind({})}
</Story>
</Canvas>
## Props
<ArgsTable of={SplitButton} />
## Contribute
<Footer componentRelativePath="SplitButton/__stories__/splitButton.stories.mdx" />