We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents a17e74a + 4210393 commit 2a4d336Copy full SHA for 2a4d336
packages/bento-design-system/src/TextField/TextField.tsx
@@ -49,7 +49,10 @@ export function TextField(props: Props) {
49
? props.hidePasswordLabel ?? defaultMessages.TextField.hidePasswordLabel
50
: props.showPasswordLabel ?? defaultMessages.TextField.showPasswordLabel;
51
52
- const type = props.type === "password" && !showPassword ? "password" : "text";
+ const type = match(props.type ?? "text")
53
+ .with("password", () => (showPassword ? "text" : "password"))
54
+ .with("text", "email", "url", () => props.type)
55
+ .exhaustive();
56
57
const rightAccessory = match(props.type ?? "text")
58
.with("password", () => (
0 commit comments