Skip to content

Commit

Permalink
Merge 802c957 into 71456aa
Browse files Browse the repository at this point in the history
  • Loading branch information
victormendes5 committed Dec 19, 2018
2 parents 71456aa + 802c957 commit 2da30eb
Show file tree
Hide file tree
Showing 12 changed files with 76 additions and 0 deletions.
15 changes: 15 additions & 0 deletions storybook/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions storybook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
},
"dependencies": {
"sling-web-component-button": "^1.11.7",
"sling-web-component-input": "^1.11.7",
"vue": "^2.5.21"
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
49 changes: 49 additions & 0 deletions storybook/stories/input/Input.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import 'sling-web-component-input'

export default {
name: 'storybook-input',

template: `
<div>
<h1>Simple label</h1>
<sling-input label="Label" placeholder="Placeholder..."></sling-input>
<h1>Disabled</h1>
<sling-input label="Disabled" placeholder="Placeholder..." disabled></sling-input>
<h1>Success</h1>
<sling-input label="Success" placeholder="Placeholder..." validationstatus="success"></sling-input>
<h1>Warning</h1>
<sling-input label="Warning" placeholder="Placeholder..." validationstatus="warning"></sling-input>
<h1>Error</h1>
<sling-input label="Error" placeholder="Placeholder..." validationstatus="error"></sling-input>
<h1>CNPJ</h1>
<sling-input label="CNPJ" placeholder="Placeholder..." type="cnpj"></sling-input>
<h1>CPF</h1>
<sling-input label="CPF" placeholder="Placeholder..." type="cpf"></sling-input>
<h1>Phone number</h1>
<sling-input label="Telefone com DDD" placeholder="(00) 0000-0000" type="phone"></sling-input>
<h1>Cell phone number</h1>
<sling-input label="Celular com DDD" placeholder="(00) 00000-0000" type="phone"></sling-input>
<h1>Email</h1>
<sling-input label="email" placeholder="Placeholder..." type="email"></sling-input>
<h1>CEP</h1>
<sling-input label="cep" placeholder="Placeholder..." type="cep"></sling-input>
</div>
`,

methods: {
onClick() {
this.$emit('click');
},
},

};
11 changes: 11 additions & 0 deletions storybook/stories/input/input.stories.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { storiesOf } from '@storybook/vue';

import StorybookInput from './Input';

const stories = storiesOf('Input', module);

stories
.add('List of input types', () => ({
components: { StorybookInput },
template: '<storybook-Input />',
}));

0 comments on commit 2da30eb

Please sign in to comment.