Skip to content

Commit 421e0c1

Browse files
committed
use COLORS, and get rid of bundled TextInput component; directly render separate components
1 parent 38cf862 commit 421e0c1

File tree

3 files changed

+14
-19
lines changed

3 files changed

+14
-19
lines changed

src/app/input-text/page.tsx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
'use client';
22

3-
import TextInput from '@/components/TextInput/TextInput';
3+
import React from 'react';
4+
import { InputTitleText, InputText } from '../../components/TextInput/styles';
45

5-
export default function InputText() {
6-
return <TextInput />;
7-
}
6+
export default function InputTextTest() {
7+
return (
8+
<>
9+
<InputTitleText>Label</InputTitleText>
10+
<InputText $error={false} placeholder="Input Suggestion"/>
11+
</>
12+
)
13+
}

src/components/TextInput/TextInput.tsx

Lines changed: 0 additions & 11 deletions
This file was deleted.

src/components/TextInput/styles.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ export const InputText = styled.input<{ $error: boolean }>`
99
font-size: 1rem; // 16px
1010
font-family: ${inter.style};
1111
font-weight: 400;
12-
line-height: 19.2px;
12+
line-height: 19.2px;
1313
word-wrap: break-word;
14-
padding: 10px 20px 10px 20px;
14+
padding: 0.625rem 1.25rem; // 10px 20px 10px 20px;
1515
border-radius: 5px;
1616
border: 1px solid
1717
${({ $error }) => ($error ? COLORS.errorColor : COLORS.existingInputColor)};
@@ -23,7 +23,7 @@ export const InputText = styled.input<{ $error: boolean }>`
2323
2424
&:focus {
2525
outline: none !important;
26-
border: 1px solid
26+
border: 2px solid
2727
${({ $error }) => ($error ? COLORS.errorColor : COLORS.activeGreen)};
2828
}
2929
&::placeholder {
@@ -32,7 +32,7 @@ export const InputText = styled.input<{ $error: boolean }>`
3232
}
3333
`;
3434
export const InputTitleText = styled.label`
35-
color: #555555;
35+
color: ${COLORS.existingInputColor};
3636
font-size: 1.5rem; // 24px;
3737
font-family: ${inter.style};
3838
font-weight: 500;

0 commit comments

Comments
 (0)