From 035343d685c8a6a83e76894090c762ebfa81cc53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20D=C3=ADaz=20Gonz=C3=A1lez?= Date: Tue, 9 Apr 2024 17:33:27 +0100 Subject: [PATCH] web: core/Field improvements - Add styles for making possible to use PF/Skeleton as field value. - Fix the return type of the onClick callback. --- web/src/assets/styles/blocks.scss | 6 ++++++ web/src/components/core/Field.jsx | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/web/src/assets/styles/blocks.scss b/web/src/assets/styles/blocks.scss index d263621fa0..f03405fcaa 100644 --- a/web/src/assets/styles/blocks.scss +++ b/web/src/assets/styles/blocks.scss @@ -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) { diff --git a/web/src/components/core/Field.jsx b/web/src/components/core/Field.jsx index f98fd32b91..54afbbfaea 100644 --- a/web/src/components/core/Field.jsx +++ b/web/src/components/core/Field.jsx @@ -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} FieldPropsWithoutIcon