Skip to content

Commit c126849

Browse files
committed
Improve types
1 parent a98b7a6 commit c126849

File tree

1 file changed

+22
-15
lines changed

1 file changed

+22
-15
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,29 @@
1+
import { AtLeast } from "../util/AtLeast";
2+
13
// NOTE(gabro): we deprecated the `style` prop due to false positive warnings in
24
// popular ESLint configs, which expect `style` to be an object.
35
// We're still keeping the old props around for backwards compatibility.
46
export type IllustrationProps = {
57
size: 24 | 32 | 40 | 80 | 160 | { custom: number };
68
} & (
7-
| {
8-
kind: "color";
9-
/**
10-
* @deprecated use `kind` instead
11-
*/
12-
style?: "color";
13-
}
14-
| {
15-
kind: "outline";
16-
/**
17-
* @deprecated use `kind` instead
18-
*/
19-
style?: "outline";
20-
color: "default" | "disabled" | "inherit";
21-
}
9+
| AtLeast<
10+
{
11+
kind: "color";
12+
/**
13+
* @deprecated use `kind` instead
14+
*/
15+
style: "color";
16+
},
17+
"kind" | "style"
18+
>
19+
| (AtLeast<
20+
{
21+
kind: "outline";
22+
/**
23+
* @deprecated use `kind` instead
24+
*/
25+
style: "outline";
26+
},
27+
"kind" | "style"
28+
> & { color: "default" | "disabled" | "inherit" })
2229
);

0 commit comments

Comments
 (0)