Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import React from 'react';
import { actions } from '@storybook/addon-actions';
import { Input, Icon, Flexbox, Button } from '../../..';
import { Display } from '../../../common/Display';
// A bit laggy for now, let's optimize later
const handlers = actions(
'onBlur',
'onClick',
'onFocus',
'onKeyDown',
'onKeyUp',
'onKeyPress',
'onChange',
);
export default {
title: 'Molecules | Input / Text',
parameters: {
component: Input.Text,
},
};
// @ts-ignore
import { actions } from '@storybook/addon-actions';
import { select, text } from '@storybook/addon-knobs';
import { storiesOf } from '@storybook/react';
import React from 'react';
import Button from '../components/Button';
const events = actions(
'onClick',
'onPointerDown',
'onPointerUp',
'onPointerOver',
'onPointerLeave',
);
storiesOf(Button.name, module).add('contained', () => (
stories.add('Events', () => {
const eventsFromObject = actions('onClick', 'onDblclick', 'onMousedown');
return ;
});
.add('default', () => ({
props: {
text: {
default: text('Text', 'A Button')
}
},
methods: actions(
'click',
'focus',
'blur'
),
template: '{{ text }}'
}))
.add('disabled', () => ({
export const multipleActions = () => (
<button>(Double) click me to log the action</button>
);
export const multipleActionsConfig = () => (
<button>
Moving away from this story will persist the action logger
</button>
);
import React from 'react';
import { storiesOf } from '@storybook/react';
import { actions, action } from '@storybook/addon-actions';
import { Input, FormField } from '../../..';
import { Display } from '../../../common/Display';
const handlers = actions(
'onBlur',
'onClick',
'onFocus',
'onKeyDown',
'onKeyUp',
'onKeyPress',
'onChange',
'onStepUp',
'onStepDown',
);
storiesOf('Molecules | Input / Number', module)
.add('Default', () => (