@swrve/core
Version:
Core set of Swrve UI Components
49 lines (42 loc) • 1.1 kB
JavaScript
import React from 'react'
import Textarea from './textarea'
const styles = {
margin: '20px 50px 40px'
}
const WrapperDecorator = Story => (
<div style={styles}>
<Story />
</div>
)
export default {
title: 'Core/Textarea',
decorators: [WrapperDecorator],
component: Textarea
}
export const ABasicTextareaComponent = args => {
return <Textarea {...args} />
}
export const TheTextareaComponentAcceptsAVarietyOfProps = args => {
return (
<Textarea
disabled={true}
className={'foo'}
error={false}
onChange={() => {
console.log('Textarea was changed!')
}}
placeholder="Textarea placeholder"
{...args}
/>
)
}
TheTextareaComponentAcceptsAVarietyOfProps.storyName =
'The Textarea component accepts a variety of props.'
TheTextareaComponentAcceptsAVarietyOfProps.parameters = {
docs: {
description: {
story: `The Textarea component renders a textarea element. \n \nIt accepts all props associated with textarea attributes, general
React-related props (e.g. onChange) and custom classNames.`
}
}
}