@i-dot-ai-npm/component-library-react 0.0.10 → 0.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@i-dot-ai-npm/component-library-react",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "description": "React components for i.AI GOV.UK.",
5
5
  "type": "module",
6
6
  "scripts": {
package/src/index.ts CHANGED
@@ -119,6 +119,7 @@ export { default as TableCell } from "./table/TableCell";
119
119
  export { default as TableHead } from "./table/TableHead";
120
120
  export { default as TableHeader } from "./table/TableHeader";
121
121
  export { default as TableRow } from "./table/TableRow";
122
+ export { default as TableSearchAndFilter } from "./table/TableSearchAndFilter";
122
123
  export { default as Table } from "./table/Table";
123
124
  export { default as TabPanel } from "./tabs/TabPanel";
124
125
  export { default as Tab } from "./tabs/Tab";
@@ -0,0 +1,18 @@
1
+ /** @jsxImportSource react */
2
+
3
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
4
+
5
+ type TableSearchAndFilterProps = ComponentPropsWithoutRef<'div'> & {
6
+ class?: string;
7
+ children?: ReactNode;
8
+ };
9
+
10
+ export default function TableSearchAndFilter({ class: className, children, ...rest }: TableSearchAndFilterProps) {
11
+ const classes = ["govuk-table__search-and-filter-wrapper", className ?? ""].filter(Boolean).join(" ");
12
+
13
+ return (
14
+ <div className={classes} {...rest}>
15
+ {children ?? ""}
16
+ </div>
17
+ );
18
+ }