가맹점 정보, 일부 상수 및 공용 변경
This commit is contained in:
@@ -178,6 +178,6 @@ export interface EmptyTokenAddSendCodeResponse {
|
||||
authCode: string;
|
||||
};
|
||||
|
||||
export interface DetailArrowProps {
|
||||
show?: boolean;
|
||||
export interface SectionArrowProps {
|
||||
isOpen?: boolean;
|
||||
};
|
||||
26
src/entities/common/ui/section-title-arrow.tsx
Normal file
26
src/entities/common/ui/section-title-arrow.tsx
Normal file
@@ -0,0 +1,26 @@
|
||||
import { useEffect, useState } from 'react';
|
||||
import { IMAGE_ROOT } from '@/shared/constants/common';
|
||||
import {
|
||||
AltMsgKeys,
|
||||
SectionArrowProps
|
||||
} from '../model/types';
|
||||
|
||||
export const SectionTitleArrow = ({ isOpen }: SectionArrowProps) => {
|
||||
const [altMsg, setAltMsg] = useState<AltMsgKeys>(AltMsgKeys.Fold);
|
||||
const [className, setClassName] = useState<string>('ic20 rot-180');
|
||||
|
||||
useEffect(() => {
|
||||
setAltMsg((isOpen)? AltMsgKeys.Fold: AltMsgKeys.UnFold);
|
||||
setClassName(`ic20 ${(isOpen)? 'rot-180': ''}`);
|
||||
}, [isOpen]);
|
||||
|
||||
return (
|
||||
<>
|
||||
<img
|
||||
className={ className }
|
||||
src={ IMAGE_ROOT + '/select_arrow.svg' }
|
||||
alt={ altMsg }
|
||||
/>
|
||||
</>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user