initial structure for components rewrite

This commit is contained in:
Rodrigo Antinarelli authored and James A. Petts committed 2020-05-15 13:18:30 +02:00
1 parent 944afe4a3e
commit c391c007ff
284 files changed
+68087 -17215

No files matched your search

@@ -0,0 +1,17 @@
import React from 'react';
import Label from '../Label';
const Input = ({ label, ...rest }) => {
return (
<>
<Label text="Label">
<input
className="transition duration-300 shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"
{...rest}
/>
</Label>
</>
);
};
export default Input;
@@ -0,0 +1,30 @@
---
name: Input
menu: Components
route: components/input
---
import { Playground, Props } from 'docz';
import Input from './';
# Input
## Properties
<Props of={Input} />
## Basic usage
<Playground>
{() => {
const [inputValue, setInputValue] = React.useState('');
return (
<Input
label="Label"
value={inputValue}
placeholder="Type something..."
onChange={e => setInputValue(e.target.value)}
/>
);
}}
</Playground>
@@ -0,0 +1,2 @@
import Input from './Input';
export default Input;