Skip to content

Commit

Permalink
Merge pull request #1227 from Wizleap-Inc/fix/form-control-layoutshift
Browse files Browse the repository at this point in the history
Fix(form-control): エラーメッセージ表示によるレイアウトシフト発生を防ぐ
  • Loading branch information
ichi-h authored Feb 26, 2024
2 parents f1e5df1 + 68674bb commit 17414b3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/kind-cars-sneeze.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@wizleap-inc/wiz-ui-react": patch
---

fix(form-control): エラーメッセージ表示によるレイアウトシフト発生を防ぐ
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ComponentName } from "@wizleap-inc/wiz-ui-constants";
import { ComponentName, THEME } from "@wizleap-inc/wiz-ui-constants";
import { FC, ReactNode, useContext } from "react";

import { WizHStack, WizTag, WizText, WizVStack } from "@/components";
Expand Down Expand Up @@ -47,13 +47,13 @@ const FormControl: FC<Props> = ({
</WizHStack>
<WizVStack>{children}</WizVStack>
</WizHStack>
{error && (
<WizHStack height={THEME.fontSize.sm}>
<div style={{ marginInlineStart: labelWidth }}>
<WizText fontSize="xs2" lineHeight="sm" color="red.800">
{error}
</WizText>
</div>
)}
</WizHStack>
</WizVStack>
</FormControlContext.Provider>
);
Expand Down

0 comments on commit 17414b3

Please sign in to comment.