Skip to content

Commit 09c7880

Browse files
committed
fix(example-app): 🐛 fix all type errors of example app
1 parent 1e1b586 commit 09c7880

21 files changed

+93
-67
lines changed

example/src/modules/feedback/CircularProgressScreen.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,12 @@ export const CircularProgressScreen = () => {
5858
>
5959
<CircularProgress
6060
style={!hasCustomTrack ? null : tailwind.style("w-48 h-48")}
61-
hint={!hasHints ? null : `${progressValue}%`}
61+
hint={!hasHints ? undefined : `${progressValue}%`}
6262
value={progressValue}
6363
themeColor={selectedTheme}
6464
size={selectedSize}
6565
progressTrackColor={
66-
!hasCustomTrack ? null : tailwind.getColor("text-green-600")
66+
!hasCustomTrack ? undefined : tailwind.getColor("text-green-600")
6767
}
6868
/>
6969
</Box>
@@ -74,7 +74,9 @@ export const CircularProgressScreen = () => {
7474
>
7575
<RadioGroup
7676
value={selectedSize}
77-
onChange={(value: CircularProgressSizes) => setSelectedSize(value)}
77+
onChange={(value: string) =>
78+
setSelectedSize(value as CircularProgressSizes)
79+
}
7880
orientation="horizontal"
7981
>
8082
<Group label="Sizes">
@@ -86,7 +88,9 @@ export const CircularProgressScreen = () => {
8688
</RadioGroup>
8789
<RadioGroup
8890
value={selectedTheme}
89-
onChange={(value: CircularProgressTheme) => setSelectedTheme(value)}
91+
onChange={(value: string) =>
92+
setSelectedTheme(value as CircularProgressTheme)
93+
}
9094
orientation="horizontal"
9195
>
9296
<Group label="Theme" style={tailwind.style("mt-2")}>

example/src/modules/feedback/MeterComponentScreen.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export const MeterComponentScreen = () => {
4848
>
4949
<RadioGroup
5050
value={selectedSize}
51-
onChange={(value: MeterSizes) => setSelectedSize(value)}
51+
onChange={(value: string) => setSelectedSize(value as MeterSizes)}
5252
orientation="horizontal"
5353
>
5454
<Group label="Sizes">
@@ -59,7 +59,7 @@ export const MeterComponentScreen = () => {
5959
</RadioGroup>
6060
<RadioGroup
6161
value={selectedTheme}
62-
onChange={(value: MeterTheme) => setSelectedTheme(value)}
62+
onChange={(value: string) => setSelectedTheme(value as MeterTheme)}
6363
orientation="horizontal"
6464
>
6565
<Group label="Theme" style={tailwind.style("mt-2")}>

example/src/modules/feedback/ProgressScreen.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,9 @@ export const ProgressScreen = () => {
7979
>
8080
<RadioGroup
8181
value={selectedSize}
82-
onChange={(value: ProgressBarSizes) => setSelectedSize(value)}
82+
onChange={(value: string) =>
83+
setSelectedSize(value as ProgressBarSizes)
84+
}
8385
orientation="horizontal"
8486
>
8587
<Group label="Sizes">
@@ -90,7 +92,9 @@ export const ProgressScreen = () => {
9092
</RadioGroup>
9193
<RadioGroup
9294
value={selectedTheme}
93-
onChange={(value: ProgressBarTheme) => setSelectedTheme(value)}
95+
onChange={(value: string) =>
96+
setSelectedTheme(value as ProgressBarTheme)
97+
}
9498
orientation="horizontal"
9599
>
96100
<Group label="Theme" style={tailwind.style("mt-2")}>

example/src/modules/feedback/SpinnerScreen.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export const SpinnerScreen = () => {
4343
>
4444
<RadioGroup
4545
value={selectedSize}
46-
onChange={(value: SpinnerSizes) => setSelectedSize(value)}
46+
onChange={(value: string) => setSelectedSize(value as SpinnerSizes)}
4747
orientation="horizontal"
4848
>
4949
<Group label="Sizes">
@@ -56,7 +56,7 @@ export const SpinnerScreen = () => {
5656
</RadioGroup>
5757
<RadioGroup
5858
value={selectedTheme}
59-
onChange={(value: SpinnerTheme) => setSelectedTheme(value)}
59+
onChange={(value: string) => setSelectedTheme(value as SpinnerTheme)}
6060
orientation="horizontal"
6161
>
6262
<Group label="Theme" style={tailwind.style("mt-2")}>
@@ -69,8 +69,8 @@ export const SpinnerScreen = () => {
6969
</RadioGroup>
7070
<RadioGroup
7171
value={selectedSpinnerTrackVisibility}
72-
onChange={(value: SpinnerTrackVisibility) =>
73-
setSelectedSpinnerTrackVisibility(value)
72+
onChange={(value: string) =>
73+
setSelectedSpinnerTrackVisibility(value as SpinnerTrackVisibility)
7474
}
7575
orientation="horizontal"
7676
>

example/src/modules/forms/CheckboxGroupScreen.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export const CheckboxGroupScreen = () => {
5757
>
5858
<RadioGroup
5959
value={selectedSize}
60-
onChange={(value: CheckboxSizes) => setSelectedSize(value)}
60+
onChange={(value: string) => setSelectedSize(value as CheckboxSizes)}
6161
orientation="horizontal"
6262
>
6363
<Group label="Sizes">
@@ -68,7 +68,7 @@ export const CheckboxGroupScreen = () => {
6868
</RadioGroup>
6969
<RadioGroup
7070
value={selectedTheme}
71-
onChange={(value: CheckboxTheme) => setSelectedTheme(value)}
71+
onChange={(value: string) => setSelectedTheme(value as CheckboxTheme)}
7272
orientation="horizontal"
7373
>
7474
<Group label="Theme" style={tailwind.style("mt-2")}>

example/src/modules/forms/InputScreen.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export const InputScreen = () => {
6060
>
6161
<RadioGroup
6262
value={selectedSize}
63-
onChange={(value: InputSizes) => setSelectedSize(value)}
63+
onChange={(value: string) => setSelectedSize(value as InputSizes)}
6464
orientation="horizontal"
6565
>
6666
<Group label="Sizes">
@@ -72,7 +72,9 @@ export const InputScreen = () => {
7272
</RadioGroup>
7373
<RadioGroup
7474
value={selectedVariant}
75-
onChange={(value: InputVariants) => setSelectedVariant(value)}
75+
onChange={(value: string) =>
76+
setSelectedVariant(value as InputVariants)
77+
}
7678
orientation="horizontal"
7779
>
7880
<Group label="Variants" style={tailwind.style("mt-2")}>

example/src/modules/forms/RadioScreen.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export const RadioScreen = () => {
7878
>
7979
<RadioGroup
8080
value={selectedSize}
81-
onChange={(value: RadioSizes) => setSelectedSize(value)}
81+
onChange={(value: string) => setSelectedSize(value as RadioSizes)}
8282
orientation="horizontal"
8383
>
8484
<Group label="Sizes">
@@ -89,7 +89,7 @@ export const RadioScreen = () => {
8989
</RadioGroup>
9090
<RadioGroup
9191
value={selectedTheme}
92-
onChange={(value: RadioTheme) => setSelectedTheme(value)}
92+
onChange={(value: string) => setSelectedTheme(value as RadioTheme)}
9393
orientation="horizontal"
9494
>
9595
<Group label="Theme" style={tailwind.style("mt-2")}>

example/src/modules/forms/SelectScreen.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export const SelectScreen = () => {
115115
>
116116
<RadioGroup
117117
value={selectedSize}
118-
onChange={(value: SelectSizes) => setSelectedSize(value)}
118+
onChange={(value: string) => setSelectedSize(value as SelectSizes)}
119119
orientation="horizontal"
120120
>
121121
<Group label="Sizes">
@@ -127,7 +127,9 @@ export const SelectScreen = () => {
127127
</RadioGroup>
128128
<RadioGroup
129129
value={selectedVariant}
130-
onChange={(value: SelectVariants) => setSelectedVariant(value)}
130+
onChange={(value: string) =>
131+
setSelectedVariant(value as SelectVariants)
132+
}
131133
orientation="horizontal"
132134
>
133135
<Group label="Variant" style={tailwind.style("mt-2")}>

example/src/modules/forms/SliderComponentScreen.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export const SliderComponentScreen = () => {
5353
>
5454
<RadioGroup
5555
value={selectedSize}
56-
onChange={(value: SliderSizes) => setSelectedSize(value)}
56+
onChange={(value: string) => setSelectedSize(value as SliderSizes)}
5757
orientation="horizontal"
5858
>
5959
<Group label="Sizes">
@@ -64,7 +64,7 @@ export const SliderComponentScreen = () => {
6464
</RadioGroup>
6565
<RadioGroup
6666
value={selectedTheme}
67-
onChange={(value: SliderTheme) => setSelectedTheme(value)}
67+
onChange={(value: string) => setSelectedTheme(value as SliderTheme)}
6868
orientation="horizontal"
6969
>
7070
<Group label="Theme" style={tailwind.style("mt-2")}>

example/src/modules/forms/SwitchComponentScreen.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export const SwitchComponentScreen = () => {
5050
>
5151
<RadioGroup
5252
value={selectedSize}
53-
onChange={(value: SwitchSize) => setSelectedSize(value)}
53+
onChange={(value: string) => setSelectedSize(value as SwitchSize)}
5454
orientation="horizontal"
5555
>
5656
<Group label="Sizes">
@@ -62,7 +62,7 @@ export const SwitchComponentScreen = () => {
6262
</RadioGroup>
6363
<RadioGroup
6464
value={selectedTheme}
65-
onChange={(value: SwitchTheme) => setSelectedTheme(value)}
65+
onChange={(value: string) => setSelectedTheme(value as SwitchTheme)}
6666
orientation="horizontal"
6767
>
6868
<Group label="Theme" style={tailwind.style("mt-2")}>

0 commit comments

Comments
 (0)