diff --git a/packages/web-domains/src/answer/features/answer-question/components/BalanceQuestion.tsx b/packages/web-domains/src/answer/features/answer-question/components/BalanceQuestion.tsx index 899d419d..78c04db9 100644 --- a/packages/web-domains/src/answer/features/answer-question/components/BalanceQuestion.tsx +++ b/packages/web-domains/src/answer/features/answer-question/components/BalanceQuestion.tsx @@ -1,8 +1,8 @@ 'use client'; -import { Interpolation, Theme } from '@emotion/react'; -import { Button, Txt, fontWeightVariants } from '@sambad/sds/components'; +import { css, Interpolation, Theme } from '@emotion/react'; +import { Txt, fontWeightVariants } from '@sambad/sds/components'; import { colors } from '@sambad/sds/theme'; -import { useEffect, useState } from 'react'; +import { ButtonHTMLAttributes, useEffect, useState } from 'react'; import { AnswerQuestionOptionType } from '@/answer/common/apis/schema/AnswerQuestion'; @@ -11,25 +11,6 @@ interface BalanceQuestionProps { onChangeAnswerList?: (answerIdList: number[]) => void; } -const buttonStyles: Record<'selected' | 'default', Interpolation> = { - selected: { - borderRadius: '24px', - height: '90px', - backgroundColor: colors.primary500, - fontWeight: fontWeightVariants.medium, - fontSize: '20px', - color: colors.white, - }, - default: { - borderRadius: '24px', - height: '90px', - backgroundColor: colors.grey400, - fontWeight: fontWeightVariants.medium, - fontSize: '20px', - color: colors.grey700, - }, -}; - export const BalanceQuestion = ({ answerOptionList, onChangeAnswerList }: BalanceQuestionProps) => { const [selectedOption, setSelectedOption] = useState(answerOptionList[0] || null); @@ -48,23 +29,57 @@ export const BalanceQuestion = ({ answerOptionList, onChangeAnswerList }: Balanc return (
- + VS - +
); }; + +interface SelectButtonProps extends ButtonHTMLAttributes { + isSelected: boolean; +} + +export const SelectButton = (props: SelectButtonProps) => { + const { isSelected, ...restProps } = props; + + return ( +