File tree Expand file tree Collapse file tree
packages/module/src/WidgetLayout Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -178,8 +178,9 @@ const GridTile = ({
178178
179179 return (
180180 < Card
181+ { ...widgetConfig . config ?. wrapperProps }
181182 ouiaId = { `${ widgetType } -widget` }
182- className = { clsx ( 'grid-tile' , {
183+ className = { clsx ( 'grid-tile' , widgetConfig . config ?. wrapperProps ?. className , {
183184 static : widgetConfig . static ,
184185 } ) }
185186 >
@@ -222,7 +223,7 @@ const GridTile = ({
222223 </ Flex >
223224 </ CardHeader >
224225 < Divider />
225- < CardBody className = " pf-v6-u-p-0" > { children } </ CardBody >
226+ < CardBody { ... widgetConfig . config ?. cardBodyProps } className = { clsx ( ' pf-v6-u-p-0' , widgetConfig . config ?. cardBodyProps ?. className ) } > { children } </ CardBody >
226227 </ Card >
227228 ) ;
228229} ;
Original file line number Diff line number Diff line change 11import { Layout } from 'react-grid-layout' ;
2+ import { CardProps , CardBodyProps } from '@patternfly/react-core' ;
23
34export const widgetIdSeparator = '#' ;
45
@@ -43,6 +44,8 @@ export interface WidgetConfiguration {
4344 icon ?: React . ReactNode ;
4445 headerLink ?: WidgetHeaderLink ;
4546 title ?: string ;
47+ wrapperProps ?: Omit < CardProps , 'children' > ;
48+ cardBodyProps ?: Omit < CardBodyProps , 'children' > ;
4649}
4750
4851/**
You can’t perform that action at this time.
0 commit comments