Skip to content

Commit

Permalink
move Password and Confirmation inputs to Input folder for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
giogonzo committed Apr 4, 2018
1 parent a5db61e commit ae147f9
Show file tree
Hide file tree
Showing 12 changed files with 44 additions and 72 deletions.
20 changes: 0 additions & 20 deletions src/ConfirmationInput/Examples.md

This file was deleted.

18 changes: 0 additions & 18 deletions src/ConfirmationInput/README.md

This file was deleted.

2 changes: 0 additions & 2 deletions src/ConfirmationInput/index.ts

This file was deleted.

File renamed without changes.
35 changes: 35 additions & 0 deletions src/Input/Examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,38 @@ const wrapperProps = { style: { marginRight: '10px', width: '150px' } };
</FlexView>
</form>
```

#### Password Input

```js
initialState = { value: '' };

const onChange = value => setState({ value });

<PasswordInput
placeholder='super secret password'
value={state.value}
onChange={onChange}
/>
```

#### Confirmation Input

```js
initialState = {};

const onConfirm = value => console.log(`confirmed: ${value}`);
const onClear = () => console.log('cleared!');
const onChange = value => setState({ value });

const initialValue = state.value;

<form className='ui form'>
<ConfirmationInput
placeholder='Type Word'
{...{ initialValue, onChange, onConfirm, onClear }}
text={{ clear: 'clear', toConfirm: 'to confirm' }}
icon={{ clear: undefined, toConfirm: undefined }}
/>
</form>
```
File renamed without changes.
3 changes: 3 additions & 0 deletions src/Input/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
import { Input } from './Input';
import { ConfirmationInput } from './ConfirmationInput';
import { PasswordInput } from './PasswordInput';
export { ConfirmationInput, PasswordInput, Input };
export default Input;
13 changes: 0 additions & 13 deletions src/PasswordInput/Examples.md

This file was deleted.

3 changes: 0 additions & 3 deletions src/PasswordInput/README.md

This file was deleted.

2 changes: 0 additions & 2 deletions src/PasswordInput/index.ts

This file was deleted.

8 changes: 2 additions & 6 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ export { Button };
export { StatefulButton } from './Button';
import MoreOrLess from './MoreOrLess';
export { MoreOrLess };
import ConfirmationInput from './ConfirmationInput';
export { ConfirmationInput };
import Badge from './Badge';
export { Badge };
import NavBar from './NavBar';
Expand Down Expand Up @@ -62,7 +60,5 @@ import DateField from './DateField';
export { DateField };
import Image from './Image';
export { Image };
import Input from './Input';
export { Input };
import PasswordInput from './PasswordInput';
export { PasswordInput };
import { Input, PasswordInput, ConfirmationInput } from './Input';
export { Input, PasswordInput, ConfirmationInput };
12 changes: 4 additions & 8 deletions test/scripts/__snapshots__/build.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ Array [
"Button/button.css",
"Button/index.d.ts",
"Button/index.js",
"ConfirmationInput/ConfirmationInput.d.ts",
"ConfirmationInput/ConfirmationInput.js",
"ConfirmationInput/index.d.ts",
"ConfirmationInput/index.js",
"DateField/DateField.d.ts",
"DateField/DateField.js",
"DateField/dateField.css",
Expand Down Expand Up @@ -76,8 +72,12 @@ Array [
"Image/getUrl.js",
"Image/index.d.ts",
"Image/index.js",
"Input/ConfirmationInput.d.ts",
"Input/ConfirmationInput.js",
"Input/Input.d.ts",
"Input/Input.js",
"Input/PasswordInput.d.ts",
"Input/PasswordInput.js",
"Input/index.d.ts",
"Input/index.js",
"Input/input.css",
Expand Down Expand Up @@ -134,10 +134,6 @@ Array [
"Panel/index.js",
"Panel/panel.css",
"Panel/tabbedPanel.css",
"PasswordInput/PasswordInput.d.ts",
"PasswordInput/PasswordInput.js",
"PasswordInput/index.d.ts",
"PasswordInput/index.js",
"Popover/Popover.d.ts",
"Popover/Popover.js",
"Popover/examples.css",
Expand Down

0 comments on commit ae147f9

Please sign in to comment.