Skip to content

Commit

Permalink
chore(label): better types
Browse files Browse the repository at this point in the history
  • Loading branch information
ecarreras committed Oct 10, 2024
1 parent 7fa6697 commit 4578f4d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/widgets/base/Label.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const { Text, Title } = Typography;
const { useToken } = theme;

type Props = WidgetProps & {
ooui: LabelOoui;
align?: "left" | "center" | "right";
responsiveBehaviour?: boolean;
};
Expand All @@ -21,8 +22,7 @@ const alignClass = {

const Label = (props: Props) => {
const { ooui, align, responsiveBehaviour } = props;
const { label, tooltip, fieldForLabel, labelSize, labelType } =
ooui as LabelOoui;
const { label, tooltip, fieldForLabel, labelSize, labelType } = ooui;
const formContext = useContext(FormContext) as FormContextType;
const addColon = fieldForLabel !== null;
let labelText = addColon && label.length > 1 ? label + " :" : label;
Expand Down

0 comments on commit 4578f4d

Please sign in to comment.