-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(packages): validation state deprecated, isInvalid prop adjusted
- Loading branch information
1 parent
3aa8642
commit 546a835
Showing
30 changed files
with
435 additions
and
169 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
"@nextui-org/checkbox": patch | ||
"@nextui-org/select": patch | ||
"@nextui-org/input": patch | ||
"@nextui-org/radio": patch | ||
"@nextui-org/theme": patch | ||
--- | ||
|
||
validationState prop deprecated, "isInvalid" prop adjusted, invalid checkbox and radios state improved |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
const App = `import {CheckboxGroup, Checkbox} from "@nextui-org/react"; | ||
export default function App() { | ||
const [isInvalid, setIsInvalid] = React.useState(true); | ||
return ( | ||
<CheckboxGroup | ||
isRequired | ||
description="Select the cities you want to visit" | ||
isInvalid={isInvalid} | ||
label="Select cities" | ||
onValueChange={(value) => { | ||
setIsInvalid(value.length < 1); | ||
}} | ||
> | ||
<Checkbox value="buenos-aires">Buenos Aires</Checkbox> | ||
<Checkbox value="sydney">Sydney</Checkbox> | ||
<Checkbox value="san-francisco">San Francisco</Checkbox> | ||
<Checkbox value="london">London</Checkbox> | ||
<Checkbox value="tokyo">Tokyo</Checkbox> | ||
</CheckboxGroup> | ||
); | ||
}`; | ||
|
||
const react = { | ||
"/App.jsx": App, | ||
}; | ||
|
||
export default { | ||
...react, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
const App = `import {RadioGroup, Radio} from "@nextui-org/react"; | ||
export default function App() { | ||
const [selected, setSelected] = React.useState("london"); | ||
const validOptions = ["buenos-aires", "san-francisco", "tokyo"]; | ||
const isInvalid = !validOptions.includes(selected); | ||
return ( | ||
<div className="flex flex-col gap-3"> | ||
<RadioGroup | ||
label="Select your favorite city" | ||
value={selected} | ||
isInvalid={isInvalid} | ||
onValueChange={setSelected} | ||
> | ||
<Radio value="buenos-aires">Buenos Aires</Radio> | ||
<Radio value="sydney">Sydney</Radio> | ||
<Radio value="san-francisco">San Francisco</Radio> | ||
<Radio value="london">London</Radio> | ||
<Radio value="tokyo">Tokyo</Radio> | ||
</RadioGroup> | ||
<p className="text-default-500 text-small">Selected: {selected}</p> | ||
</div> | ||
); | ||
}`; | ||
|
||
const react = { | ||
"/App.jsx": App, | ||
}; | ||
|
||
export default { | ||
...react, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.