Skip to content

Commit

Permalink
Feat(web-twig): Deprecate isFullWidth prop in Dropdown component
Browse files Browse the repository at this point in the history
  * use `fullWidthMode` prop instead
  • Loading branch information
literat committed Feb 3, 2023
1 parent 6f9bf3a commit 544264d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
{%- set _classNames = [ _rootClassName, _fullWidthClassName, _class ] | merge(_placementClassNames[_placement]) -%}

{# Deprecations #}
{% if _isFullWidth %}
{% deprecated 'Dropdown: The "isFullWidth" property is deprecated, use "fullWidthMode" instead.' %}
{% endif %}
{% if _breakpoint %}
{% deprecated 'Dropdown: The "breakpoint" property is deprecated, use "fullWidthMode" instead.' %}
{% endif %}
Expand Down
18 changes: 9 additions & 9 deletions packages/web-twig/src/Resources/components/Dropdown/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ attributes to register trigger events.

### Dropdown

| Prop name | Type | Default | Required | Description |
| --------------- | -------------------------------------------------------- | ------------- | -------- | ------------------------------------------------------------------------------------------- |
| `id` | `string` | - | yes | Dropdown ID |
| `breakpoint` | `string` | - | no | [**DEPRECATED**][deprecated] in favor of `fullWidthMode`; Breakpoint level [tablet,desktop] |
| `fullWidthMode` | `string` | - | no | Full-width mode [off,mobile-only,all] |
| `class` | `string` | `null` | no | Custom CSS class |
| `elementType` | `string` | `div` | no | HTML tag to render |
| `isFullWidth` | `boolean` | `false` | no | Whether is component displayed in full width |
| `placement` | [`bottom-left`, `bottom-right`, `top-left`, `top-right`] | `bottom-left` | no | Alignment of the component |
| Prop name | Type | Default | Required | Description |
| --------------- | -------------------------------------------------------- | ------------- | -------- | ------------------------------------------------------------------------------------------------------ |
| `id` | `string` | - | yes | Dropdown ID |
| `breakpoint` | `string` | - | no | [**DEPRECATED**][deprecated] in favor of `fullWidthMode`; Breakpoint level [tablet,desktop] |
| `fullWidthMode` | `string` | - | no | Full-width mode [off,mobile-only,all] |
| `class` | `string` | `null` | no | Custom CSS class |
| `elementType` | `string` | `div` | no | HTML tag to render |
| `isFullWidth` | `boolean` | `false` | no | [**DEPRECATED**][deprecated] in favor of `fullWidthMode`; Whether is component displayed in full width |
| `placement` | [`bottom-left`, `bottom-right`, `top-left`, `top-right`] | `bottom-left` | no | Alignment of the component |

### Trigger attributes

Expand Down

0 comments on commit 544264d

Please sign in to comment.