-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
johancs.mm@gmail.com
committed
May 4, 2024
1 parent
fca0019
commit 1da826a
Showing
6 changed files
with
38 additions
and
24 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 |
---|---|---|
|
@@ -19,3 +19,4 @@ export * from './separator' | |
|
||
export * from './checkbox' | ||
export * from './dialog' | ||
export * from './input' |
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,4 @@ | ||
import Input from './input' | ||
|
||
export type { Comp as InputComponent, Props as InputProps } from './input' | ||
export { Input } |
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,21 @@ | ||
import { cn, input } from '@openui-org/theme' | ||
import * as React from 'react' | ||
|
||
export interface Comp extends HTMLInputElement {} | ||
export interface Props extends React.InputHTMLAttributes<HTMLInputElement> {} | ||
|
||
const Input = React.forwardRef<Comp, Props>(({ className, type, ...props }, ref) => { | ||
return ( | ||
<input | ||
type={type} | ||
className={cn(input(), className)} | ||
ref={ref} | ||
{...props} | ||
/> | ||
) | ||
}, | ||
) | ||
|
||
Input.displayName = 'Input' | ||
|
||
export default Input |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -17,3 +17,4 @@ export * from './separator' | |
|
||
export * from './checkbox' | ||
export * from './dialog' | ||
export * from './input' |
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,11 @@ | ||
import { cva } from 'class-variance-authority' | ||
|
||
/** | ||
* Input wrapper **Class Variants** component | ||
* | ||
* const styles = input({}) | ||
* | ||
* @example | ||
* <Input className={styles())} /> | ||
*/ | ||
export const input = cva('flex h-10 w-full rounded-medium px-3 py-2 text-small file:border-0 file:bg-transparent file:text-small file:font-medium disabled:cursor-not-allowed disabled:opacity-50') |