From 370e768ebafd300b7974cb53b87a62a61448871b Mon Sep 17 00:00:00 2001 From: Marco Vidal Garcia Date: Thu, 26 Oct 2023 15:09:22 +0200 Subject: [PATCH] feat(Textarea): remove size prop BREAKING CHANGE: Textarea component no longer has the `size` prop. --- docs/src/__examples__/Textarea/DEFAULT.tsx | 6 ------ .../orbit-components/src/Textarea/README.md | 9 ++++---- .../src/Textarea/Textarea.stories.tsx | 21 +------------------ .../src/Textarea/__tests__/index.test.tsx | 4 ++-- .../orbit-components/src/Textarea/consts.ts | 5 ----- .../src/Textarea/index.js.flow | 1 - .../orbit-components/src/Textarea/index.tsx | 11 ++++------ .../orbit-components/src/Textarea/types.d.ts | 1 - 8 files changed, 11 insertions(+), 47 deletions(-) diff --git a/docs/src/__examples__/Textarea/DEFAULT.tsx b/docs/src/__examples__/Textarea/DEFAULT.tsx index cf021f473a..f3f79576f5 100644 --- a/docs/src/__examples__/Textarea/DEFAULT.tsx +++ b/docs/src/__examples__/Textarea/DEFAULT.tsx @@ -65,12 +65,6 @@ export default { options: ["none", "vertical"], defaultValue: "none", }, - { - name: "size", - type: "select", - options: ["small", "normal"], - defaultValue: "normal", - }, ], }, ], diff --git a/packages/orbit-components/src/Textarea/README.md b/packages/orbit-components/src/Textarea/README.md index 2d37781f94..a9752049be 100644 --- a/packages/orbit-components/src/Textarea/README.md +++ b/packages/orbit-components/src/Textarea/README.md @@ -38,7 +38,6 @@ Table below contains all types of the props available in Textarea component. | rows | `number` | | Specifies the height of the text area (in lines). | | readOnly | `boolean` | | Adds readOnly to html textarea element. | | required | `boolean` | | If true, the label is displayed as required. | -| size | [`enum`](#enum) | `"normal"` | The size of the Textarea. | | spaceAfter | `enum` | | Additional `margin-bottom` after component. [See this docs](https://github.com/kiwicom/orbit/tree/master/packages/orbit-components/src/common/getSpacingToken) | | tabIndex | `string \| number` | | Specifies the tab order of an element | | value | `string` | | Specifies the value of the Textarea. To be used with controlled usage. | @@ -46,10 +45,10 @@ Table below contains all types of the props available in Textarea component. ### enum -| size | resize | -| :--------- | :----------- | -| `"small"` | `"vertical"` | -| `"normal"` | `"none"` | +| resize | +| :----------- | +| `"vertical"` | +| `"none"` | ## Functional specs diff --git a/packages/orbit-components/src/Textarea/Textarea.stories.tsx b/packages/orbit-components/src/Textarea/Textarea.stories.tsx index 16c9add1ac..dec2f6c20a 100644 --- a/packages/orbit-components/src/Textarea/Textarea.stories.tsx +++ b/packages/orbit-components/src/Textarea/Textarea.stories.tsx @@ -2,7 +2,7 @@ import * as React from "react"; import { action } from "@storybook/addon-actions"; import { text, boolean, select, number } from "@storybook/addon-knobs"; -import { SIZE_OPTIONS, RESIZE_OPTIONS } from "./consts"; +import { RESIZE_OPTIONS } from "./consts"; import RenderInRtl from "../utils/rtl/RenderInRtl"; import SPACINGS_AFTER from "../common/getSpacingToken/consts"; @@ -28,23 +28,6 @@ Default.story = { }, }; -export const SmallSize = () => { - const value = text("Value", ""); - const placeholder = text("Placeholder", "Placeholder"); - - return ( -