kirandash / greenhouse-react-ui

🧩 React UI component library built with Tailwind CSS
https://6442bd489bd20422b7ada446-nmudwbaxnc.chromatic.com/
MIT License
9 stars 8 forks source link

feat: add Textarea component #6

Closed kirandash closed 1 year ago

kirandash commented 1 year ago

Design: (Please use the same styles that are already added for input component)

Base textarea: image

Disabled state for textarea: image Ex: <Textarea disabled rows="3" placeholder="Enter some long form content." />

Invalid state: image Ex: <Textarea invalid rows="3" placeholder="Enter some long form content." />

Textarea with label: image Ex:

<Label>
  <span>Message</span>
  <Textarea className="mt-1" rows="3" placeholder="Enter some long form content." />
</Label>

Note: The default base textarea doesn't need any special prop, but all attributes that you would usually use in normal HTML are available here too. Note that if you're not using a Label component (not recommended), you should use an aria-label attribute to give screen readers a label.

Props overview

Prop Description Type Default
disabled apply disabled styles to the textarea boolean  
invalid apply invalid styles to the textarea boolean  


**Requirements:** - [ ] should be able to import as: `import { Textarea } from 'greenhouse-react-ui'` - [ ] Customisable: User should be able to pass their own class, style or other props ex: `rows` to the element and it should be applied, please have a look at the other existing components to understand how it is done - [ ] Add unit tests to test the above requirements, please have a look at tests written for other components
erandakarachchi commented 1 year ago

Hi @kirandash , I would like to work on this if this hasn't been worked already.

kirandash commented 1 year ago

Hi @kirandash ,

I would like to work on this if this hasn't been worked already.

Hi @erandakarachchi

Thanks a lot for showing your interest.

If you need any help, you can comment here or reach me on Discord: https://discord.gg/62VR3MMCVm

kirandash commented 1 year ago

Thanks a lot for your contribution @erandakarachchi !

erandakarachchi commented 1 year ago

I'm really happy to help @kirandash 😀