1
1
import { Box , Flex , HStack , Stack } from "@chakra-ui/layout"
2
2
import { chakra } from "@chakra-ui/system"
3
3
import { openInStackblitz } from "lib/open-in-stackblitz"
4
- import { useState } from "react"
4
+ import { JSX , useState } from "react"
5
5
import { SiStackblitz } from "react-icons/si"
6
6
7
7
const Header = ( props : any ) => (
@@ -164,7 +164,7 @@ export function Playground(props: PlaygroundProps) {
164
164
type = "text"
165
165
defaultValue = { value as any }
166
166
bg = "bg-subtle"
167
- onChange = { ( e ) => {
167
+ onChange = { ( e : React . ChangeEvent < HTMLInputElement > ) => {
168
168
setState ( { ...state , [ key ] : e . target . value } )
169
169
} }
170
170
/>
@@ -184,7 +184,7 @@ export function Playground(props: PlaygroundProps) {
184
184
px = "2"
185
185
bg = "bg-subtle"
186
186
defaultValue = { state [ key ] as number }
187
- onChange = { ( e ) => {
187
+ onChange = { ( e : React . ChangeEvent < HTMLInputElement > ) => {
188
188
const val = e . currentTarget . valueAsNumber
189
189
setState ( ( s ) => ( { ...s , [ key ] : isNaN ( val ) ? 0 : val } ) )
190
190
} }
@@ -205,7 +205,7 @@ export function Playground(props: PlaygroundProps) {
205
205
px = "1"
206
206
bg = "bg-subtle"
207
207
defaultValue = { state [ key ] as any }
208
- onChange = { ( e ) => {
208
+ onChange = { ( e : React . ChangeEvent < HTMLSelectElement > ) => {
209
209
setState ( ( s ) => ( { ...s , [ key ] : e . target . value } ) )
210
210
} }
211
211
>
0 commit comments