UNPKG

@music-loopy/loops

Version:

A React component library for Music Loopy Applications and websites

70 lines (69 loc) 2.26 kB
var _templateObject; function _taggedTemplateLiteralLoose(e, t) { return t || (t = e.slice(0)), e.raw = t, e; } import Textarea from './index'; import React from 'react'; import styled from 'styled-components'; // More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export export default { title: 'Components/Textarea ', component: Textarea, parameters: { // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout layout: 'centered' }, // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs tags: ['autodocs'], // More on argTypes: https://storybook.js.org/docs/api/argtypes argTypes: { variant: { control: { type: 'select', options: ['primary', 'secondary', 'success', 'danger', 'warning', 'info', 'light', 'dark'] } }, startIcon: { control: { type: 'object', options: { name: 'string', size: 'string', fill: ['primary', 'secondary', 'success', 'danger', 'warning', 'info', 'light', 'dark'] } } }, endIcon: { control: { type: 'object', options: { name: 'string', size: 'string', fill: ['primary', 'secondary', 'success', 'danger', 'warning', 'info', 'light', 'dark'] } } } }, // Use `fn` to spy on the onClick arg, which will appear in the actions panel once invoked: https://storybook.js.org/docs/essentials/actions#action-args args: { onClick: function onClick() {} } }; var Container = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n width: 600px;\n"]))); export var Custom = function Custom(args) { return /*#__PURE__*/React.createElement(Container, null, /*#__PURE__*/React.createElement(Textarea, { color: { background: 'darkGrey', text: 'light', border: 'primary', icon: 'light' }, maxChars: 200, placeholder: "Enter your very long text", rows: 5, label: "Artist bio", icon: args.startIcon || { name: 'user', fill: 'light', size: '1.5em' } })); };