Skip to content

Commit

Permalink
Merge pull request #462 from woowacourse-teams/feature/#461
Browse files Browse the repository at this point in the history
모임 만들기 맞지막 스탭 포커싱
  • Loading branch information
cys4585 authored Aug 22, 2024
2 parents cb490b8 + 20e45c2 commit c3432d5
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 @@ -14,7 +14,7 @@ interface DescriptionStepProps {
export default function DescriptionStep(props: DescriptionStepProps) {
const { description, onDescriptionChange, isValid, onButtonClick } = props;

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

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

0 comments on commit c3432d5

Please sign in to comment.