Skip to content

Commit

Permalink
Feat(web-twig): Deprecate optional goBackTitle in Breadcrumbs
Browse files Browse the repository at this point in the history
refs #DS-834
  • Loading branch information
literat committed Aug 28, 2023
1 parent a6dc3af commit b469abe
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
{%- set _styleProps = useStyleProps(props) -%}
{%- set _classNames = [ _rootClassName, _styleProps.className ] -%}

{# Deprecations #}
{% if not _goBackTitle %}
{% deprecated 'Breadcrumbs: The "goBackTitle" property will be required starting from the next major version.' %}
{% endif %}

<{{ _elementType }} {{ mainProps(props) }} {{ styleProp(_styleProps) }} {{ classProp(_classNames) }} aria-label="Breadcrumb">
{% apply spaceless %}
{%- if _items|length > 0 -%}
Expand Down
10 changes: 5 additions & 5 deletions packages/web-twig/src/Resources/components/Breadcrumbs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ content can be overridden by any custom block content.

## Breadcrumbs

| Name | Type | Default | Required | Description |
| ------------- | -------- | ------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `elementType` | `string` | `nav` || HTML tag to render |
| `goBackTitle` | `string` ||| Title/translation for back link to previous page on mobile. It's essential to be set along with items. If items property is not passed, backlink is to be created within children property. |
| `items` | `array` | `[]` || Navigation menu items |
| Name | Type | Default | Required | Description |
| ------------- | -------- | ------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `elementType` | `string` | `nav` || HTML tag to render |
| `goBackTitle` | `string` ||| Title/translation for back link to previous page on mobile. It's essential to be set along with items. If items property is not passed, backlink is to be created within children property. [**Optional DEPRECATED**][Deprecated] Will be **required** in the next major version. |
| `items` | `array` | `[]` || Navigation menu items |

You can add `id`, `data-*` or `aria-*` attributes to further extend the component's
descriptiveness and accessibility. Also, UNSAFE styling props are available,
Expand Down

0 comments on commit b469abe

Please sign in to comment.