diff --git a/frontend-react/src/lib/widget/component/error-fallback.module.css b/frontend-react/src/lib/widget/component/error-fallback.module.css index bc3b6fe..2f109f0 100644 --- a/frontend-react/src/lib/widget/component/error-fallback.module.css +++ b/frontend-react/src/lib/widget/component/error-fallback.module.css @@ -1,5 +1,5 @@ .alert { height: 100%; - margin: 0; + margin: -0rem; overflow-y: auto; } diff --git a/frontend-react/src/lib/widget/component/error-fallback.tsx b/frontend-react/src/lib/widget/component/error-fallback.tsx index 4e5ace9..30dbf15 100644 --- a/frontend-react/src/lib/widget/component/error-fallback.tsx +++ b/frontend-react/src/lib/widget/component/error-fallback.tsx @@ -1,5 +1,6 @@ import { Alert, AlertHeading, Button } from 'react-bootstrap'; import styles from './error-fallback.module.css'; +import { clsx } from 'clsx'; export function ErrorFallback({ error, @@ -9,7 +10,7 @@ export function ErrorFallback({ resetErrorBoundary: () => void; }) { return ( - + Widget Error

Unfortunately, the widget encountered an error and cannot be displayed. diff --git a/frontend-react/src/lib/widget/component/widget-renderer.tsx b/frontend-react/src/lib/widget/component/widget-renderer.tsx index 48bdfa5..ebefd66 100644 --- a/frontend-react/src/lib/widget/component/widget-renderer.tsx +++ b/frontend-react/src/lib/widget/component/widget-renderer.tsx @@ -5,9 +5,11 @@ import { getUserData } from '../../user-data'; import styles from './widget-renderer.module.css'; import { ErrorBoundary } from 'react-error-boundary'; import { ErrorFallback } from './error-fallback.tsx'; +import { clsx } from 'clsx'; export interface WidgetRendererProps { widgetInstanceId: string; + borderless: boolean; } export const WidgetConfigContext = createContext(undefined); @@ -36,9 +38,11 @@ registerWidget({ }); `; + const isBorderless = widget?.borderless; + return (

{widget ? ( diff --git a/frontend-react/src/lib/widget/model.ts b/frontend-react/src/lib/widget/model.ts index 76355db..8b3274b 100644 --- a/frontend-react/src/lib/widget/model.ts +++ b/frontend-react/src/lib/widget/model.ts @@ -40,4 +40,8 @@ export interface Widget< * A configuration element that is used to configure the widget. */ configElement: ReactNode; + /** + * If `true`, the widget gets rendered without a default padding. + */ + borderless?: boolean; }