diff --git a/package.json b/package.json index e97f1f1..1e9a871 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ecmwf-projects/cads-ui-library", - "version": "8.2.2", + "version": "8.2.3", "description": "Common UI kit library", "repository": { "type": "git", diff --git a/src/index.ts b/src/index.ts index e835500..6179902 100644 --- a/src/index.ts +++ b/src/index.ts @@ -29,6 +29,7 @@ export { StringListWidget } from './widgets/StringListWidget' export { StringChoiceWidget } from './widgets/StringChoiceWidget' export { DateRangeWidget } from './widgets/DateRangeWidget' export { FreeformInputWidget } from './widgets/FreeformInputWidget' +export { BlankWidget } from './widgets/BlankWidget' export { StringListArrayWidget } from './widgets/StringListArrayWidget' /** diff --git a/src/widgets/BlankWidget.tsx b/src/widgets/BlankWidget.tsx new file mode 100644 index 0000000..136ac03 --- /dev/null +++ b/src/widgets/BlankWidget.tsx @@ -0,0 +1,38 @@ +import React from 'react' + +import { Widget, WidgetHeader, WidgetTitle } from './Widget' + +/** + * BlankWidget. + * Widget to display a block of any element. + */ +const BlankWidget = ({ + name, + label, + children, + labelAriaHidden = true +}: { + name?: string + label?: string + children: React.ReactNode + labelAriaHidden?: boolean +}) => { + return ( + + {label && ( + + + {label} + + + )} +
{children}
+
+ ) +} + +export { BlankWidget }