Skip to content

Commit

Permalink
chore(TextArea): add resizable area example to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
korvin89 committed Apr 19, 2024
1 parent d89610a commit a03091a
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
32 changes: 32 additions & 0 deletions src/components/controls/TextArea/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,38 @@ The row count of the `TextArea` is controlled by the `rows`, `minRows` and `maxR
</ExampleBlock>
LANDING_BLOCK-->

## Resizable TextArea

You can get resizable behaviour by providing `resize` style to `controlProps` property.

<!--LANDING_BLOCK
<ExampleBlock
code={`
<TextArea
rows={4}
placeholder="Placeholder"
style={{width: "auto", maxWidth: "100%"}}
controlProps={{style: {resize: "both"}}}
/>
`}
>
<UIKit.TextArea
rows={4}
placeholder="Placeholder"
style={{width: "auto", maxWidth: "100%"}}
controlProps={{style: {resize: "both"}}}
/>
</ExampleBlock>
LANDING_BLOCK-->

<!--GITHUB_BLOCK-->

```tsx
<TextArea rows={4} controlProps={{style: {resize: 'both'}}} />
```

<!--/GITHUB_BLOCK-->

## Properties

| Name | Description | Type | Default |
Expand Down
2 changes: 1 addition & 1 deletion src/components/controls/TextInput/TextInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ export type TextInputPin = InputControlPin;
export type TextInputSize = InputControlSize;
export type TextInputView = InputControlView;

// eslint-disable-next-line complexity
export const TextInput = React.forwardRef<HTMLSpanElement, TextInputProps>(
// eslint-disable-next-line complexity
function TextInput(props, ref) {
const {
view = 'normal',
Expand Down

0 comments on commit a03091a

Please sign in to comment.