Skip to content

Commit d962388

Browse files
committed
(fix): make the Props type more strict
1 parent 7145d39 commit d962388

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

packages/bento-design-system/src/ReadOnlyField/ReadOnlyField.tsx

+10-4
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,18 @@ type Props = Omit<
1212
"onChange" | "onBlur" | "disabled" | "isReadOnly" | "placeholder" | "issues"
1313
> &
1414
(
15-
| {
15+
| ({
1616
withCopyButton: true;
1717
copyButtonLabel: LocalizedString;
18-
copySuccessMessage: LocalizedString;
19-
showToastOnCopy?: boolean;
20-
}
18+
} & (
19+
| {
20+
copySuccessMessage: LocalizedString;
21+
showToastOnCopy: true;
22+
}
23+
| {
24+
showToastOnCopy?: false;
25+
}
26+
))
2127
| {
2228
withCopyButton?: false;
2329
}

0 commit comments

Comments
 (0)