@@ -2,13 +2,17 @@ import {
22 type Column ,
33 HeaderCell ,
44 type HeaderCellProps ,
5+ type NumberOutputProps ,
56 ReducedListDisplay ,
67 type ReducedListDisplayProps ,
78 type SortDirection ,
89 type TableActionsProps ,
9- NumberOutputProps ,
1010} from '@ifrc-go/ui' ;
11- import { createNumberColumn , createStringColumn , numericIdSelector } from '@ifrc-go/ui/utils' ;
11+ import {
12+ createNumberColumn ,
13+ createStringColumn ,
14+ numericIdSelector ,
15+ } from '@ifrc-go/ui/utils' ;
1216import { _cs } from '@togglecorp/fujs' ;
1317
1418import Link , { type Props as LinkProps } from '#components/Link' ;
@@ -20,7 +24,6 @@ import type { Props as RegionLinkProps } from '../RegionLink';
2024import RegionLink from '../RegionLink' ;
2125
2226import styles from './styles.module.css' ;
23- import { CellProps } from '../../../../../packages/ui/dist/components/Table/Cell' ;
2427
2528type Options < D , K , CompProps , HeaderProps > = {
2629 sortable ?: boolean ,
@@ -168,7 +171,7 @@ export function createRegionListColumn<DATUM, KEY>(
168171 } ;
169172 } ,
170173 cellRendererClassName : options ?. cellRendererClassName ,
171- columnClassName : options ?. columnClassName ,
174+ columnClassName : _cs ( styles . regionList , options ?. columnClassName ) ,
172175 headerCellRendererClassName : options ?. headerCellRendererClassName ,
173176 cellContainerClassName : options ?. cellContainerClassName ,
174177 columnWidth : options ?. columnWidth ,
@@ -221,7 +224,7 @@ export function createDisasterTypeColumn<D, K extends string | number>(
221224 id : string ,
222225 title : string ,
223226 accessor : ( item : D ) => string | undefined | null ,
224- options ?: Options < D , K , CellProps < string > , HeaderCellProps > ,
227+ options ?: Options < D , K , { value : string } , HeaderCellProps > ,
225228) {
226229 return createStringColumn < D , K > (
227230 id ,
@@ -234,6 +237,40 @@ export function createDisasterTypeColumn<D, K extends string | number>(
234237 ) ;
235238}
236239
240+ export function createTitleColumn < D , K extends string | number > (
241+ id : string ,
242+ title : string ,
243+ accessor : ( item : D ) => string | undefined | null ,
244+ options ?: Options < D , K , { value : string } , HeaderCellProps > ,
245+ ) {
246+ return createStringColumn < D , K > (
247+ id ,
248+ title ,
249+ accessor ,
250+ {
251+ ...options ,
252+ columnClassName : _cs ( styles . title , options ?. columnClassName ) ,
253+ } ,
254+ ) ;
255+ }
256+
257+ export function createAppealCodeColumn < D , K extends string | number > (
258+ id : string ,
259+ title : string ,
260+ accessor : ( item : D ) => string | undefined | null ,
261+ options ?: Options < D , K , { value : string } , HeaderCellProps > ,
262+ ) {
263+ return createStringColumn < D , K > (
264+ id ,
265+ title ,
266+ accessor ,
267+ {
268+ ...options ,
269+ columnClassName : _cs ( styles . appealCode , options ?. columnClassName ) ,
270+ } ,
271+ ) ;
272+ }
273+
237274export function createBudgetColumn < D , K extends string | number > (
238275 id : string ,
239276 title : string ,
0 commit comments