Skip to content

Commit

Permalink
fixup! Docs(web-react): List Deprecations in the web react package #D…
Browse files Browse the repository at this point in the history
…S-1147
  • Loading branch information
crishpeen committed Mar 12, 2024
1 parent 0217fc2 commit b7c6a93
Showing 1 changed file with 20 additions and 9 deletions.
29 changes: 20 additions & 9 deletions packages/web-react/DEPRECATIONS-v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Following deprecations will be removed in version 2 of the _spirit-web-react_ pa

## Deprecations

### Required `id` prop for form components
### Required `id` Prop for Form Components

The `id` prop will be required for all form components.

Expand All @@ -26,17 +26,27 @@ Related components:

Add `id` prop to the form components.

### FileUploaderAttachment `buttonLabel` and `editButtonLabel` props
### FileUploaderAttachment `buttonLabel` and `editButtonLabel` Props

The `buttonLabel` and `editButtonLabel` props will be removed from the `FileUploaderAttachment` component.
Use `removeText` and `editText` props instead.

#### Migration Guide

Use codemod to automatically update your codebase.

```sh
npx @lmc-eu/spirit-codemods -p <path> -t v2/web-react/fileuploader-prop-names
```

See [Codemods documentation][readme-codemods] for more details.

Or manually replace the props in your project.

- `<FileUploaderAttachment buttonLabel="Remove this attachment" … />``<FileUploaderAttachment removeText="Remove this attachment" … />`
- `<FileUploaderAttachment editButtonLabel="Edit this attachment" … />``<FileUploaderAttachment editText="Edit this attachment" … />`

### Dropdown `id` prop
### Dropdown `id` Prop

The `id` prop will be mandatory for the `Dropdown` component.

Expand All @@ -46,7 +56,7 @@ Add `id` prop to the `Dropdown` component.

### Tooltip and Dropdown Placements

The `Tooltip` and `Dropdown` components no longer support non-flows relative placements.
The `Tooltip` and `Dropdown` components no longer support non-flow-relative placements.

#### Migration Guide

Expand Down Expand Up @@ -103,7 +113,7 @@ Use:

See [`Tooltip` documentation][tooltip-readme] for more details and examples.

### Tooltip off placement
### Tooltip `off` Placement

The `off` placement is deprecated and will be removed in the next major version.

Expand Down Expand Up @@ -144,7 +154,7 @@ const onToggle = () => setIsOpen(!isOpen);

See [`Dropdown` documentation][dropdown-readme] for more details and examples.

### Grid breakpoint props
### Grid Breakpoint Props

The `cols` prop in the `Grid` now supports object values for different breakpoints.
The `tablet` and `desktop` props will be removed in the next major version.
Expand All @@ -157,7 +167,7 @@ Replace `tablet` and `desktop` props with the `cols` object prop.
- `<Grid desktop="3" … />``<Grid cols={{ desktop: 3 }} … />`
- `<Grid cols="1" tablet="2" desktop="3" … />``<Grid cols={{ mobile: 1, tablet: 2, desktop: 3 }} … />`

### ModalDialog `isScrollable` prop
### ModalDialog `isScrollable` Prop

The `isScrollable` prop will be set to `false` by default in the next major release and the ModalDialog will be made
non-scrollable by default. It will be possible to re-enable the inside scrolling by adding the `isScrollable` prop.
Expand All @@ -166,7 +176,7 @@ non-scrollable by default. It will be possible to re-enable the inside scrolling

Add `isScrollable` prop to the `ModalDialog` component.

### ModalDialog uniform appearance
### ModalDialog Uniform Appearance

The uniform `ModalDialog` appearance will replace current behavior in the next major release. Current mobile appearance will
remain accessible via the `isDockedOnMobile` property.
Expand All @@ -175,7 +185,7 @@ remain accessible via the `isDockedOnMobile` property.

Add `isDockedOnMobile` prop to the `ModalDialog` component.

### Alert `danger` icon
### Alert `danger` Icon

The `warning` icon as a fallback for the `danger` color in the Alert component will be removed in favor of the `danger` icon.
Please, add the `danger` icon to your project's assets.
Expand All @@ -184,6 +194,7 @@ Please, add the `danger` icon to your project's assets.

Either install newer version of the `spirit-icons` package or add `danger` named icon to your project's icons.

[readme-codemods]: https://github.com/lmc-eu/spirit-design-system/blob/main/packages/codemods/README.md
[dictionary-placement]: https://github.com/lmc-eu/spirit-design-system/blob/main/docs/DICTIONARIES.md#placement
[dropdown-readme]: https://github.com/lmc-eu/spirit-design-system/blob/main/packages/web-react/src/components/Dropdown/README.md
[readme-deprecations]: https://github.com/lmc-eu/spirit-design-system/blob/main/packages/web-react/README.md#deprecations
Expand Down

0 comments on commit b7c6a93

Please sign in to comment.