정렬 박스 및 드랍다운 섹션 화살표 공통화 처리

This commit is contained in:
focp212@naver.com
2025-09-19 09:49:39 +09:00
parent 3a813420dd
commit 34dc536455
19 changed files with 49 additions and 139 deletions

View File

@@ -78,6 +78,15 @@ export enum FooterItemActiveKey {
Settlement = 'Settlement',
Account = 'Account',
};
export enum SortByKeys {
New = 'New',
Amount = 'Amount',
};
export interface SortOptionsBoxProps {
sortBy: SortByKeys;
onClickToSort: (sortBy: SortByKeys) => void;
};
export interface CodesSelectParams {
codeCl?: string;
colNm?: string;

View File

@@ -0,0 +1,22 @@
import { SortByKeys, SortOptionsBoxProps } from '../model/types';
export const SortOptionsBox = ({
sortBy,
onClickToSort
}: SortOptionsBoxProps) => {
return (
<>
<div className="sort-options">
<button
className={ `sort-btn ${(sortBy === SortByKeys.New)? 'active': ''}` }
onClick={ () => onClickToSort(SortByKeys.New) }
></button>
<span className="sort-divider">|</span>
<button
className={ `sort-btn ${(sortBy === SortByKeys.Amount)? 'active': ''}` }
onClick={ () => onClickToSort(SortByKeys.Amount) }
></button>
</div>
</>
);
};