Option to customize classes of the container in showFirstRow

This commit is contained in:
Kuba Orlik 2024-07-28 15:14:19 +02:00
parent 56bbc65e95
commit eb4f23d627

View File

@ -28,6 +28,7 @@ export async function showFirstRow({
{show_less_button}
</>
),
classes = [],
}: {
items: FlatTemplatable[];
min_column_width_px?: number;
@ -39,6 +40,7 @@ export async function showFirstRow({
show_more_button: JSX.Element,
show_less_button: JSX.Element
) => JSX.Element;
classes?: string[];
}): Promise<string> {
const id = showFirstRowIds.next().value;
const checkbox_id = "show-first-row__checkbox--" + id;
@ -48,6 +50,7 @@ export async function showFirstRow({
"show-first-row",
`show-first-row--id-${id}`,
`show-first-row--items-count-${items.length}`,
...classes,
]}
style={`--min-column-width: ${min_column_width_px}px; --items-count: ${items.length}; --column-gap: ${column_gap_px}px`}
>