Skip to content

Commit 687e507

Browse files
committed
[style]버튼,인풋컴포넌트 수정
1 parent 7e3724f commit 687e507

File tree

3 files changed

+28
-28
lines changed

3 files changed

+28
-28
lines changed

src/shared/components/InputBox/ChatInput.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function ChatInput({ id, placeholder, className, ref }: Props) {
2727
id={id}
2828
name={id}
2929
ref={ref}
30-
onKeyDown={(e)=>keyDown(e)}
30+
onKeyDown={(e) => keyDown(e)}
3131
onInput={(e) => handleInput(e)}
3232
placeholder={placeholder}
3333
className={` px-4 py-1 rounded-lg h-13 bg-white text-primary leading-11 placeholder:text-gray-dark resize-none outline-none ${className}`}

src/shared/components/InputBox/Input.tsx

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -49,31 +49,31 @@ function Input({
4949
}: Props) {
5050
return (
5151
<div className={tw(InputClass({ size, className }))}>
52-
<label htmlFor={id} className="flex-1">
53-
<input
54-
id={id}
55-
type={type}
56-
placeholder={placeholder}
57-
className={`outline-none w-full flex-1 leading-${size}`}
58-
ref={ref}
59-
onChange={onChange}
60-
{...rest}
61-
/>
62-
</label>
63-
{variant === 'search' ? (
64-
<button type="button">
65-
<Search aria-label="검색버튼" />
66-
</button>
67-
) : variant === 'comment' ? (
68-
<Button
69-
color="purple"
70-
type="submit"
71-
size='auto'
72-
className="w-10 h-6 flex-center text-xs px-1.5 py-[1px] rounded-sm shadow-md"
73-
>
74-
입력
75-
</Button>
76-
) : null}
52+
<label htmlFor={id} className="flex-1">
53+
<input
54+
id={id}
55+
type={type}
56+
placeholder={placeholder}
57+
className={`outline-none w-full flex-1 leading-${size}`}
58+
ref={ref}
59+
onChange={onChange}
60+
{...rest}
61+
/>
62+
</label>
63+
{variant === 'search' ? (
64+
<button type="button">
65+
<Search aria-label="검색버튼" />
66+
</button>
67+
) : variant === 'comment' ? (
68+
<Button
69+
color="purple"
70+
type="submit"
71+
size="auto"
72+
className="w-10 h-6 flex-center text-xs px-1.5 py-[1px] rounded-sm shadow-md"
73+
>
74+
입력
75+
</Button>
76+
) : null}
7777
</div>
7878
);
7979
}

src/shared/components/button/Button.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { cva } from 'class-variance-authority';
33
import { ButtonHTMLAttributes, Ref } from 'react';
44

55
interface Props extends ButtonHTMLAttributes<HTMLButtonElement> {
6-
size?: 'default' | 'sm' | 'auto'
6+
size?: 'default' | 'sm' | 'auto';
77
color?: 'default' | 'purple';
88
ref?: Ref<HTMLButtonElement | null>;
99
disable?: boolean;
@@ -26,7 +26,7 @@ export const ButtonClass = cva(
2626
size: {
2727
default: 'h-10 min-w-25',
2828
sm: 'h-8 min-w-20',
29-
auto:'w-auto'
29+
auto: 'w-auto',
3030
},
3131
},
3232
defaultVariants: {

0 commit comments

Comments
 (0)