Skip to content

Commit

Permalink
feature: 모임 만들기 맞지막 스탭 포커싱
Browse files Browse the repository at this point in the history
  • Loading branch information
cys4585 committed Aug 22, 2024
1 parent 7ff7b91 commit 20e45c2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions frontend/src/components/Funnel/FunnelTextArea/FunnelTextArea.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
import { useTheme } from '@emotion/react';
import * as S from './FunnelTextArea.style';
import { forwardRef } from 'react';
import { forwardRef, Ref, TextareaHTMLAttributes } from 'react';

interface FunnelTextAreaProps
extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {}
extends TextareaHTMLAttributes<HTMLTextAreaElement> {}

export default forwardRef(function FunnelTextArea(props: FunnelTextAreaProps) {
export default forwardRef(function FunnelTextArea(
props: FunnelTextAreaProps,
ref?: Ref<HTMLTextAreaElement>,
) {
const { ...rest } = props;

const theme = useTheme();

return <textarea css={S.textArea({ theme })} {...rest} />;
return <textarea ref={ref} css={S.textArea({ theme })} {...rest} />;
});
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ interface DescriptionStepProps {
export default function DescriptionStep(props: DescriptionStepProps) {
const { description, onDescriptionChange, onButtonClick } = props;

const inputRef = useRef<HTMLInputElement>(null);
const inputRef = useRef<HTMLTextAreaElement>(null);

useEffect(() => {
if (inputRef.current) {
Expand Down

0 comments on commit 20e45c2

Please sign in to comment.