Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Commit

Permalink
Merge pull request #204 from smartive-education/feature/controls-reor…
Browse files Browse the repository at this point in the history
…dering

Feature/controls reordering
  • Loading branch information
tomschall authored Feb 7, 2023
2 parents f2878c5 + c72ea86 commit 5b6f84e
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ export default {
control: 'text',
},
imageCallBack: {
control: false,
action: action('image clicked'),
},
buttonCallBack: {
control: false,
action: action('button clicked'),
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ export default {
args: {
src: 'https://picsum.photos/640/360',
alt: 'This is a profile picture',
loading: false,
type: 'container',
loading: false,
},
} as ComponentMeta<typeof ImageContainer>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export default {
args: {
label: 'Display Name',
variant: 'small',
type: 'edit',
username: {
label: 'Username',
href: '',
Expand Down Expand Up @@ -87,7 +88,6 @@ export default {
label: 'Follow',
fCallBack: action('btn clicked'),
},
type: 'edit',
},
} as ComponentMeta<typeof User>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ export default {
args: {
label: 'Button Label',
type: 'button',
disabled: false,
size: 'small',
width: 'default',
color: 'slate',
icon: 'logo',
disabled: false,
},
} as ComponentMeta<typeof Button>;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from 'react';
import { ComponentStory, ComponentMeta } from '@storybook/react';
import { NaviButton } from '../../components/buttons/NaviButton';
import { IconsMapped } from '../../components/icons/IconMap';
import NaviButtonReadme from '../../docs/NaviButton.md';

export default {
Expand All @@ -19,13 +18,23 @@ export default {
},
icon: {
control: 'select',
options: Object.keys(IconsMapped),
options: ['settings', 'logout'],
if: { arg: 'variant', eq: 'default' },
},
avatar: {
control: 'object',
},
},
args: {
label: 'Label',
variant: 'default',
icon: 'settings',
avatar: {
variant: 'small',
src: 'https://media.giphy.com/media/cfuL5gqFDreXxkWQ4o/giphy.gif',
alt: 'Alternative text',
},
},
} as ComponentMeta<typeof NaviButton>;

const Template: ComponentStory<typeof NaviButton> = (args) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ import { action } from '@storybook/addon-actions';
export default {
title: 'Form/Switch',
component: Switch,
parameters: {},
argTypes: {
value: {
control: 'text',
},
},
} as ComponentMeta<typeof Switch>;

const Template: ComponentStory<typeof Switch> = (args) => <Switch {...args} />;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,20 @@ import debounce from 'lodash.debounce';
export default {
title: 'Form',
component: TextBox,
argTypes: {
inputValue: {
control: false,
table: {
disable: true,
},
},
setInputValue: {
control: false,
table: {
disable: true,
},
},
},
} as ComponentMeta<typeof TextBox>;

const Template: ComponentStory<typeof TextBox> = (args) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ export default {
},
args: {
variant: 'timeline',
text: 'Zombie ipsum reversus ab viral inferno, nam rick grimes malum cerebro. De carne lumbering animata corpora quaeritis. Summus brains sit​​, morbo vel maleficia? De apocalypsi gorger omero undead survivor dictum mauris. Hi mindless mortuis soulless creaturas, imo evil stalking.',
mbSpacing: '0',
user: {
avatar: {
alt: 'avatar',
Expand Down Expand Up @@ -71,7 +73,6 @@ export default {
},
variant: 'xlarge',
},
text: 'Zombie ipsum reversus ab viral inferno, nam rick grimes malum cerebro. De carne lumbering animata corpora quaeritis. Summus brains sit​​, morbo vel maleficia? De apocalypsi gorger omero undead survivor dictum mauris. Hi mindless mortuis soulless creaturas, imo evil stalking.',
img: {
alt: 'This is a profile picture!',
fCallBack: action('icon clicked'),
Expand All @@ -89,7 +90,6 @@ export default {
fCallBack: action('share clicked'),
label: 'Share',
},
mbSpacing: '0',
},
} as ComponentMeta<typeof Mumble>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export default {
args: {
variant: 'edit',
mbSpacing: '32',
text: 'Schreib etwas über dich.',
banner: {
src: 'https://loremflickr.com/640/360',
alt: 'Picture',
Expand Down Expand Up @@ -66,8 +67,6 @@ export default {
imageCallBack: action('avatar image clicked'),
},
},

text: 'Schreib etwas über dich.',
},
} as ComponentMeta<typeof MumbleHeader>;

Expand All @@ -82,6 +81,7 @@ MumbleStory.parameters = {
component: MumbleHeaderReadme,
},
},
// controls: { sort: 'requiredFirst' },
};

MumbleStory.storyName = 'Mumble-Header';

0 comments on commit 5b6f84e

Please sign in to comment.