Skip to content

Commit

Permalink
Merge pull request #2761 from XiaoMi/hotfix/form/2756
Browse files Browse the repository at this point in the history
fix(form): 修复横向表单错误提示样式问题 (#2756)
  • Loading branch information
solarjoker authored Mar 8, 2024
2 parents df4dddd + 7fc7e2c commit b03249f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/flat-parrots-smoke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@hi-ui/form": patch
---

fix: 修复横向表单错误提示样式问题
5 changes: 5 additions & 0 deletions .changeset/many-bees-deliver.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@hi-ui/hiui": patch
---

fix(form): 修复横向表单错误提示样式问题
4 changes: 3 additions & 1 deletion packages/ui/form/src/FormLabel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ export const FormLabel = forwardRef<HTMLDivElement | null, FormLabelProps>((prop

return {
labelWidth,
controlWidth: `calc(100% - ${labelWidth}px)`,
controlWidth: isNumeric(labelWidth)
? `calc(100% - ${labelWidth}px)`
: `calc(100% - ${labelWidth})`,
}
}, [labelPlacement, labelWidthProp])

Expand Down

0 comments on commit b03249f

Please sign in to comment.