Skip to content

Commit dca4f47

Browse files
committed
Create input
1 parent 3ea2589 commit dca4f47

File tree

8 files changed

+405
-1
lines changed

8 files changed

+405
-1
lines changed

.storybook/config.js

Whitespace-only changes.

src/components/Button/Button.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ import { ButtonPrimary, ButtonSecondary } from './Button';
44
import '../../style/index.scss'
55

66
storiesOf('Button', module).add('Primary', () => {
7-
return <ButtonPrimary >login</ButtonPrimary>;
7+
return <ButtonPrimary>login</ButtonPrimary>;
88
});

src/components/Button/buttons.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
border: none;
77
color: $text-dark;
88
font-weight: bold;
9+
outline: none;
910
}
1011

1112
.btn-primary {
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import * as React from 'react';
2+
import { storiesOf } from '@storybook/react';
3+
import { Input } from './Input';
4+
import '../../style/index.scss'
5+
6+
storiesOf('Input', module).add('Input', () => {
7+
return <Input placeholder="placeholder" />;
8+
});

src/components/Input/Input.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import React from "react";
2+
3+
export const Input = (props: React.HTMLProps<HTMLInputElement>) => (
4+
<input
5+
{...props}
6+
/>
7+
);

src/components/Input/input.scss

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
input {
2+
width: 348px;
3+
height: 48px;
4+
line-height: 48px;
5+
font-size: 18px;
6+
background: #313849;
7+
border-radius: 4px;
8+
color: $accented;
9+
padding: 16px;
10+
box-sizing: border-box;
11+
}
12+
13+
input::placeholder {
14+
color: $hint;
15+
font-size: 18px;
16+
}

src/style/index.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
@import './reset.scss';
12
@import './variables.scss';
23
@import './common.scss';
34

45
@import '../components/Button/buttons.scss';
6+
@import '../components/Input/input.scss';

0 commit comments

Comments
 (0)