From a16d91f5926419e9de761f45ef313fbac391945f Mon Sep 17 00:00:00 2001 From: Michal Murawski Date: Mon, 9 Feb 2026 09:43:07 +0100 Subject: [PATCH] feat(design-system): action menu classname pass down [AR-43506] --- .changeset/real-clocks-flow.md | 5 +++++ .../ds-table/components/ds-table-cell/ds-table-cell.tsx | 1 + .../ds-table/components/ds-table-cell/ds-table-cell.types.ts | 5 +++++ .../src/components/ds-table/ds-table.stories.module.scss | 4 ++++ .../src/components/ds-table/ds-table.stories.tsx | 1 + 5 files changed, 16 insertions(+) create mode 100644 .changeset/real-clocks-flow.md diff --git a/.changeset/real-clocks-flow.md b/.changeset/real-clocks-flow.md new file mode 100644 index 000000000..780f768c0 --- /dev/null +++ b/.changeset/real-clocks-flow.md @@ -0,0 +1,5 @@ +--- +'@drivenets/design-system': patch +--- + +- Add `className` option to the SecondaryRowAction props diff --git a/packages/design-system/src/components/ds-table/components/ds-table-cell/ds-table-cell.tsx b/packages/design-system/src/components/ds-table/components/ds-table-cell/ds-table-cell.tsx index 1615015f0..6156c70dc 100644 --- a/packages/design-system/src/components/ds-table/components/ds-table-cell/ds-table-cell.tsx +++ b/packages/design-system/src/components/ds-table/components/ds-table-cell/ds-table-cell.tsx @@ -76,6 +76,7 @@ export const DsTableCell = ({ key={i} value={label} disabled={isDisabled} + className={action.className} onClick={(e) => e.stopPropagation()} onSelect={() => action.onClick(row.original)} > diff --git a/packages/design-system/src/components/ds-table/components/ds-table-cell/ds-table-cell.types.ts b/packages/design-system/src/components/ds-table/components/ds-table-cell/ds-table-cell.types.ts index a14100483..e3305e884 100644 --- a/packages/design-system/src/components/ds-table/components/ds-table-cell/ds-table-cell.types.ts +++ b/packages/design-system/src/components/ds-table/components/ds-table-cell/ds-table-cell.types.ts @@ -39,6 +39,11 @@ export type SecondaryRowAction = Omit, 'icon'> & { * Optional icon to be displayed for the action */ icon?: IconType; + + /** + * Optional className to apply custom styling to the action item + */ + className?: string; }; /** diff --git a/packages/design-system/src/components/ds-table/ds-table.stories.module.scss b/packages/design-system/src/components/ds-table/ds-table.stories.module.scss index df44b575f..51b5102fb 100644 --- a/packages/design-system/src/components/ds-table/ds-table.stories.module.scss +++ b/packages/design-system/src/components/ds-table/ds-table.stories.module.scss @@ -369,3 +369,7 @@ white-space: pre-wrap; word-break: break-all; } + +.destructiveAction { + color: var(--system-status-error); +} diff --git a/packages/design-system/src/components/ds-table/ds-table.stories.tsx b/packages/design-system/src/components/ds-table/ds-table.stories.tsx index 6d70deae7..7cfd93748 100644 --- a/packages/design-system/src/components/ds-table/ds-table.stories.tsx +++ b/packages/design-system/src/components/ds-table/ds-table.stories.tsx @@ -491,6 +491,7 @@ export const WithRowActions: Story = { label: 'Delete', tooltip: 'Delete this row', disabled: (data) => data.status === 'single', + className: styles.destructiveAction, onClick: (data) => { alert(`Delete action for ${data.firstName}`); },