Skip to content

Commit

Permalink
web: core/Field improvements
Browse files Browse the repository at this point in the history
- Add styles for making possible to use PF/Skeleton as field value.
- Fix the return type of the onClick callback.
  • Loading branch information
dgdavid committed Apr 9, 2024
1 parent da4e04b commit 035343d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions web/src/assets/styles/blocks.scss
Original file line number Diff line number Diff line change
Expand Up @@ -760,6 +760,12 @@ section [data-type="agama/reminder"] {
text-decoration: underline;
text-underline-offset: var(--spacer-smaller);
}

div.pf-v5-c-skeleton {
display: inline-block;
vertical-align: middle;
height: 1.5ex;
}
}

> div:nth-child(n+2) {
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/core/Field.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import { If } from "~/components/core";
* @property {IconName} [icon] - The name of the icon for the field.
* @property {IconSize} [iconSize="s"] - The size for the field icon.
* @property {string} [className] - ClassName
* @property {() => {}} [onClick] - Callback
* @property {() => void} [onClick] - Callback
* @property {React.ReactNode} [children] - A content to be rendered as field children
*
* @typedef {Omit<FieldProps, 'icon'>} FieldPropsWithoutIcon
Expand Down

0 comments on commit 035343d

Please sign in to comment.