Skip to content

Commit

Permalink
feat(Seat): remove default values from title and description props
Browse files Browse the repository at this point in the history
BREAKING CHANGE: `title` and `description` props no longer have default values.
They can be manually set with text to be announced by screen readers.
  • Loading branch information
DSil committed Nov 19, 2024
1 parent 7a7c45e commit 290bf21
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
14 changes: 2 additions & 12 deletions packages/orbit-components/src/Seat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,8 @@ After adding import into your project you can use it simply like:

Table below contains all types of the props available in Seat component.

| Name | Type | Default | Description |
| :---------- | :---------------------- | :----------------------------- | :------------------------------------------- |
| dataTest | `string` | | Optional prop for testing purposes. |
| id | `string` | | Set `id` for `Seat` |
| size | [`enum`](#modal-enum) | `medium` | Size of Seat component. |
| type | [`enum`](#modal-enum) | `default` | Visual type of Seat |
| price | `string` | | Price of Seat |
| label | `string` | | Label text inside of a Seat |
| selected | `boolean` | | Marks Seat as selected |
| title | `string` | `Seat` | Optional prop for title of svg element |
| description | `string` | `Presents options for seating` | Optional prop for Description of svg element |
| onClick | `() => void \| Promise` | | Function for handling onClick event. |
| title | `string` | | Adds title title to svg element. Announced by screen readers. |
| description | `string` | | Adds description to svg element. Announced by screen readers. |

## SeatLegend

Expand Down
4 changes: 2 additions & 2 deletions packages/orbit-components/src/Seat/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ const Seat = ({
id,
price,
label,
title = "Seat",
description = "Presents options for seating",
title,
description,
}: Props) => {
const randomId = useRandomIdSeed();
const titleId = randomId("title");
Expand Down

0 comments on commit 290bf21

Please sign in to comment.