Skip to content

Commit 10af905

Browse files
authored
Merge pull request #236 from buildo/fill-available-bug
2 parents e3576f1 + 79e1ea2 commit 10af905

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

packages/bento-design-system/src/Table/createTable.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ export function createTable(
249249
function gridWidthStyle(gridWidth: GridWidth): string {
250250
return match(gridWidth)
251251
.with("fit-content", () => "max-content")
252-
.with("fill-available", () => "minmax(max-content, auto")
252+
.with("fill-available", () => "minmax(max-content, auto)")
253253
.with({ custom: __.string }, ({ custom: width }) => width)
254254
.with({ custom: __.number }, ({ custom: width }) => `${width}px`)
255255
.exhaustive();

packages/storybook/stories/Components/Table.stories.tsx

+17
Original file line numberDiff line numberDiff line change
@@ -295,3 +295,20 @@ export const Grouped = createStory({
295295
data: exampleData,
296296
groupBy: "group",
297297
});
298+
299+
export const WithFillColumn = createStory({
300+
columns: [
301+
tableColumn.text({
302+
headerLabel: formatMessage("Name"),
303+
accessor: "name",
304+
width: "fill-available",
305+
}),
306+
tableColumn.textWithIcon({
307+
headerLabel: formatMessage("Country"),
308+
accessor: "country",
309+
iconPosition: "right",
310+
hint: formatMessage("This is a hint"),
311+
}),
312+
] as const,
313+
data: exampleData,
314+
});

0 commit comments

Comments
 (0)