@music-loopy/loops
Version:
A React component library for Music Loopy Applications and websites
70 lines (69 loc) • 2.56 kB
JavaScript
var _templateObject;
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
function _taggedTemplateLiteralLoose(e, t) { return t || (t = e.slice(0)), e.raw = t, e; }
import TagInput 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/TagInput ',
component: TagInput,
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']
}
}
},
// 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 display: flex;\n align-items: center;\n justify-content: center;\n gap: 10px;\n width: 600px;\n"])));
export var Simple = function Simple(args) {
return /*#__PURE__*/React.createElement(Container, null, /*#__PURE__*/React.createElement(TagInput, _extends({
placeholder: "Enter text"
}, args, {
options: [{
value: 'chocolate',
label: 'Chocolate'
}, {
value: 'strawberry',
label: 'Strawberry'
}, {
value: 'vanilla',
label: 'Vanilla'
}],
name: "flavors"
})));
};
export var Custom = function Custom(args) {
return /*#__PURE__*/React.createElement(Container, null, /*#__PURE__*/React.createElement(TagInput, {
placeholder: "Enter text",
color: {
text: 'light',
border: 'primary',
icon: 'light'
},
options: [{
value: 'chocolate',
label: 'Chocolate'
}, {
value: 'strawberry',
label: 'Strawberry'
}, {
value: 'vanilla',
label: 'Vanilla'
}],
name: "flavors"
}));
};