Skip to content

Commit

Permalink
add default behaviour for size prop. textfield will default to medium…
Browse files Browse the repository at this point in the history
… unless otherwise specified.
  • Loading branch information
mkernohanbc committed Jun 26, 2024
1 parent 99b0e5b commit c42f40d
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const iconError = (
);

export default function TextField({
size = "medium",
size,
label,
description,
errorMessage,
Expand All @@ -66,7 +66,9 @@ export default function TextField({
)}
</Label>
)}
<div className={`bcds-react-aria-TextField--container ${size}`}>
<div
className={`bcds-react-aria-TextField--container ${size === "small" ? "small" : "medium"}`}
>
{iconLeft}
<Input className="bcds-react-aria-TextField--Input" />
{isInvalid && iconError}
Expand Down

0 comments on commit c42f40d

Please sign in to comment.