@otwdesign/admin-ui 1.7.0 → 1.8.0

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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/forms.tsx +4 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@otwdesign/admin-ui",
3
- "version": "1.7.0",
3
+ "version": "1.8.0",
4
4
  "description": "React components for OTW CMS admin screens: list tables, postboxes, forms, notices and buttons.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "OTW SRL",
@@ -34,7 +34,7 @@
34
34
  "node": ">=22.18"
35
35
  },
36
36
  "dependencies": {
37
- "@otwdesign/sdk": "1.7.0"
37
+ "@otwdesign/sdk": "1.8.0"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "react": "^19.0.0"
package/src/forms.tsx CHANGED
@@ -19,6 +19,7 @@ export function FormField({
19
19
  htmlFor,
20
20
  description,
21
21
  descriptionId,
22
+ row,
22
23
  children,
23
24
  }: {
24
25
  label: ReactNode
@@ -26,10 +27,12 @@ export function FormField({
26
27
  description?: ReactNode
27
28
  /** For the control's `aria-describedby`. */
28
29
  descriptionId?: string
30
+ /** Attributes for the row itself: `hidden`, or a `data-` name a style rule shows it by. */
31
+ row?: { hidden?: boolean; 'data-show'?: string }
29
32
  children: ReactNode
30
33
  }) {
31
34
  return (
32
- <tr>
35
+ <tr {...row}>
33
36
  <th scope="row">{htmlFor ? <label htmlFor={htmlFor}>{label}</label> : label}</th>
34
37
  <td>
35
38
  {children}