Skip to content

Commit 669e8e0

Browse files
author
crstnmac
committed
docs(text-area): 📝 add detailed previews and update docs for suffix prop
1 parent b47df4b commit 669e8e0

File tree

1 file changed

+40
-4
lines changed

1 file changed

+40
-4
lines changed

docs/text-area.md

Lines changed: 40 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Textarea
22

3-
![SCR-20221116-gzi](https://user-images.githubusercontent.com/20360870/202104722-6d5cf79a-60a7-4a06-ac61-b92aa086bf4c.png)
3+
![simulator_screenshot_2599EFE6-6D06-4AAA-90CE-FA256A79A37B](https://user-images.githubusercontent.com/20360870/202165492-a1c51c64-e289-48eb-af1b-44a5ecfe4bba.png)
44

55

66
Adapt UI provides one theme for text area component with three styles and eight interaction states. Use this component to receive information from the user.
@@ -23,12 +23,13 @@ export default function App() {
2323
- [Size](#size)
2424
- [Icon](#icon)
2525
- [Interactions](#interactions)
26+
- [Suffix](#suffix)
2627
- [Props](#props)
2728
## Themes
2829

2930
Adapt UI provides only one `base` theme for TextArea.
3031

31-
![SCR-20221116-gzi](https://user-images.githubusercontent.com/20360870/202104722-6d5cf79a-60a7-4a06-ac61-b92aa086bf4c.png)
32+
![simulator_screenshot_CF05548F-87A9-4B9B-8298-42BCC812F415](https://user-images.githubusercontent.com/20360870/202165894-10ad9c82-ce7e-4251-be58-deac6ba98eb2.png)
3233

3334
<details>
3435

@@ -60,7 +61,7 @@ Adapt UI provides four different input field components styles: `outline`,
6061
You can use these various styled input field components based on the necessity
6162
and style you wish to provide to your design.
6263

63-
![SCR-20221116-h9c](https://user-images.githubusercontent.com/20360870/202107264-835c7781-9990-435f-a02a-7a08b3e2f04f.png)
64+
![simulator_screenshot_2599EFE6-6D06-4AAA-90CE-FA256A79A37B](https://user-images.githubusercontent.com/20360870/202165492-a1c51c64-e289-48eb-af1b-44a5ecfe4bba.png)
6465

6566
<details>
6667

@@ -94,7 +95,7 @@ There are four different sizes for input in Adapt UI: `sm`, `md`, `lg` & `xl`
9495
Based on the hierarchy, you can switch between different sizes.
9596

9697

97-
![SCR-20221116-hly](https://user-images.githubusercontent.com/20360870/202110537-fbccf81a-d7a7-46b1-86f8-cc6794cfec24.png)
98+
![simulator_screenshot_9E839191-61C7-41C6-9F55-50D9CE460973](https://user-images.githubusercontent.com/20360870/202166717-f62ec9cf-c0c1-4f44-a405-c2b114e78caa.png)
9899

99100

100101
<details>
@@ -153,6 +154,41 @@ export default function App() {
153154

154155
</details>
155156

157+
158+
### Suffix
159+
160+
The suffix is a slot at the beginning or suffix position of a component. Here in the Textarea, the suffix slot can be used to bring icons. Suffix itself doesn't have any unique property.
161+
162+
Here in the Textarea, we have an icon in the suffix slot. You can change the icon by passing an component to suffix prop.
163+
The Icon will get hidden when the `loading` prop is true.
164+
165+
![simulator_screenshot_669C1EEF-2D9A-4E3F-B378-6A58DCCA0DF9](https://user-images.githubusercontent.com/20360870/202167240-dd1bedc8-a5de-46a4-b6ee-b0f81c87cc1e.png)
166+
167+
<details>
168+
169+
<summary>
170+
<b>Usage</b>
171+
</summary>
172+
173+
### Usage
174+
175+
```js
176+
import { TextArea } from "@adaptui/react-native-tailwind"
177+
178+
export default function App() {
179+
return (
180+
<>
181+
<TextArea placeholder="Type something..."
182+
suffix={<Icon icon={<Slot />} />}
183+
/>
184+
</>
185+
)
186+
}
187+
188+
```
189+
190+
</details>
191+
156192
## Props
157193

158194
> TextArea implements TextInput from React Native accepting all `TextInputProps`

0 commit comments

Comments
 (0)