You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
const[otp,setOtp]=React.useState("");const{ getContainerProps, getInputProps }=useOtpInput({// we may wrap setState in our hook, if it is convenient, and only take initialValue herevalue: otp,setValue: setOtp,});consttest=(<Box{...getContainerProps()}display='flex'flexDirection="row"gap="1em">{Array.from({length: 4}).map((_,index)=>(<Boxkey={index}gap="1em"border="1px solid #000"borderRadius="0.25em"height="3em"width="3em"><Boxas="input"{...getInputProps(index)}type="text"key={index}/></Box>))}</Box>);
This way we can use @chakra/react's <Box /> instead of div and not limit styles to containerStyle attribute
The text was updated successfully, but these errors were encountered:
This way we can use
@chakra/react
's<Box />
instead of div and not limit styles tocontainerStyle
attributeThe text was updated successfully, but these errors were encountered: