-
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.
[filigran-ui][Textarea] Add textarea input component
- Loading branch information
Showing
5 changed files
with
45 additions
and
89 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
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,23 @@ | ||
import * as React from 'react' | ||
import {cn} from '../../lib/utils' | ||
|
||
export interface TextareaProps | ||
extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {} | ||
|
||
const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>( | ||
({className, ...props}, ref) => { | ||
return ( | ||
<textarea | ||
className={cn( | ||
'flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50', | ||
className | ||
)} | ||
ref={ref} | ||
{...props} | ||
/> | ||
) | ||
} | ||
) | ||
Textarea.displayName = 'Textarea' | ||
|
||
export {Textarea} |
87 changes: 0 additions & 87 deletions
87
projects/filigran-website/components/example/example-table.tsx
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
21 changes: 21 additions & 0 deletions
21
projects/filigran-website/content/docs/components/textarea.mdx
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 @@ | ||
--- | ||
title: Textarea | ||
--- | ||
|
||
## Example | ||
|
||
<Textarea | ||
placeholder="Example Cheese and wine halloumi fromage frais. Manchego cheesy feet rubber cheese cheeseburger edam squirty cheese cheese and wine st. agur blue cheese. Cheese and biscuits dolcelatte feta parmesan feta red leicester cheese and wine queso. Cow squirty cheese cheese on toast emmental cheesecake. | ||
Mozzarella cut the cheese cheesecake. Cheesy feet gouda fromage manchego cheeseburger gouda queso hard cheese. Rubber cheese paneer queso stinking bishop stinking bishop say cheese cheese and biscuits say cheese. Pepper jack goat who moved my cheese bavarian bergkase fondue rubber cheese. | ||
Roquefort when the cheese comes out everybody's happy cheese strings. Stilton lancashire smelly cheese bavarian bergkase say cheese the big cheese airedale emmental. Fromage roquefort say cheese fromage frais cheesy feet monterey jack when the cheese comes out everybody's happy smelly cheese. Stinking bishop bocconcini manchego red leicester airedale ricotta." | ||
/> | ||
## Playground | ||
|
||
<ReactLiveDisplay | ||
codeExample={` | ||
<div className={tw(\`flex gap-2\`)}> | ||
<Textarea placeholder="Insert your paragraph here" /> | ||
</div>`} | ||
/> |