From e3a9dc4257a548e1b26f7137879dae41a30c83f6 Mon Sep 17 00:00:00 2001 From: Rafal Dziegielewski Date: Wed, 10 Jul 2024 11:19:21 +0200 Subject: [PATCH] fix: add missing data-css attributes --- src/frontend/components/routes/bulk-action.tsx | 12 ++++++++---- src/frontend/components/routes/record-action.tsx | 12 ++++++++---- src/frontend/components/routes/resource-action.tsx | 9 +++++---- 3 files changed, 21 insertions(+), 12 deletions(-) diff --git a/src/frontend/components/routes/bulk-action.tsx b/src/frontend/components/routes/bulk-action.tsx index 0841a2dce..7b986cd35 100644 --- a/src/frontend/components/routes/bulk-action.tsx +++ b/src/frontend/components/routes/bulk-action.tsx @@ -17,6 +17,7 @@ import { } from '../app/index.js' import { useTranslation, useNotice, useResource } from '../../hooks/index.js' import allowOverride from '../../hoc/allow-override.js' +import { getDataCss } from '../../index.js' type MatchParams = Pick @@ -97,10 +98,13 @@ const BulkAction: React.FC = () => { return } + const routeWrapperCss = getDataCss(resource.id, action.actionType, action.name, 'route-wrapper') + const routeActionCss = getDataCss(resource.id, action.actionType, action.name, 'route') + if (action.showInDrawer) { if (!listAction) { return ( - + { return ( <> - + { setTag={setTag} /> - + { } return ( - + {!action?.showInDrawer ? : ''} { return } + const routeWrapperCss = getDataCss(resource.id, action.actionType, action.name, 'route-wrapper') + const routeActionCss = getDataCss(resource.id, action.actionType, action.name, 'route') + if (action.showInDrawer) { if (!listAction) { return ( - + ) @@ -131,10 +135,10 @@ const RecordAction: React.FC = () => { return ( <> - + - + { } return ( - + @@ -42,11 +42,12 @@ const ResourceAction: React.FC = (props) => { const listAction = resource.resourceActions.find((r) => r.name === listActionName) const contentTag = getResourceElementCss(resource.id, action.name) + const routeActionCss = getDataCss(resource.id, action.actionType, action.name, 'route') if (action.showInDrawer) { if (!listAction) { return ( - + ) @@ -58,14 +59,14 @@ const ResourceAction: React.FC = (props) => { return ( <> - + - +