-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add isInvalid styling for inputs
- Loading branch information
1 parent
93727c4
commit c06a68a
Showing
12 changed files
with
62 additions
and
22 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 |
---|---|---|
@@ -1,7 +1,43 @@ | ||
import React from 'react' | ||
import { | ||
Checkbox, | ||
Combobox, | ||
ComboboxContent, | ||
ComboboxItem, | ||
ComboboxTrigger, | ||
RadioGroup, | ||
RadioGroupItem, | ||
TextInput, | ||
} from '@/components' | ||
import React, { useState } from 'react' | ||
|
||
const App = () => { | ||
return <div /> | ||
const [checkbox, setCheckbox] = useState(false) | ||
const [radio, setRadio] = useState(1) | ||
|
||
return ( | ||
<div className='min-h-screen w-full flex items-center justify-center gap-8'> | ||
<TextInput isInvalid /> | ||
<Combobox isInvalid> | ||
<ComboboxTrigger>trigger</ComboboxTrigger> | ||
<ComboboxContent> | ||
<ComboboxItem value={1}>value</ComboboxItem> | ||
</ComboboxContent> | ||
</Combobox> | ||
<Checkbox | ||
isInvalid={!checkbox} | ||
isChecked={checkbox} | ||
onCheckedChange={(value) => setCheckbox(value)} | ||
/> | ||
<RadioGroup | ||
isInvalid={!radio} | ||
value={radio} | ||
onValueChange={(value) => setRadio(value as number)} | ||
> | ||
<RadioGroupItem value={1} /> | ||
<RadioGroupItem value={2} /> | ||
</RadioGroup> | ||
</div> | ||
) | ||
} | ||
|
||
export { App } |
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
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
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