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
You can pass `isInvalid` to the select component to style it like the Chakra `<Input />` is styled when it receives the same prop.
179
+
You can pass `isInvalid` to the select component to style it like the Chakra `Input` is styled when it receives the same prop. Alternatively you can pass `isReadOnly` to make the component non-interactive in the same way Chakra's `Input` does.
180
180
181
-
You can pass also pass `isInvalid`or `isDisabled` to a wrapping `<FormControl />`and it will output their corresponding `<Input />` on the select.
181
+
You can pass also pass `isInvalid`, `isDisabled`, or `isReadOnly` into a wrapping `<FormControl />`to achieve the same result as passing these props into the `Select` component.
182
182
183
183
```js
184
184
return (
185
185
<>
186
186
{/* This will show up with a red border */}
187
187
<Select isInvalid />
188
188
189
-
{/* This will show up with a red border, and grayed out */}
189
+
{/* This will show up normally but will not be interactive */}
190
+
<Select isReadOnly />
191
+
192
+
{/* This will show up grayed out and will not be interactive */}
193
+
{/* Additionally, it will have a red border and the error message will be shown */}
0 commit comments