Skip to content

Commit

Permalink
Add missing disabled prop to es-action-dropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
George-Payne committed May 27, 2024
1 parent afe6084 commit 59d3f19
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/rude-seas-approve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@eventstore-ui/components': patch
---

Add missing disabled prop to `es-action-dropdown`
8 changes: 8 additions & 0 deletions packages/components/src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ export namespace Components {
* All child actions must have the `dropdownItem` prop set.
*/
interface EsActionDropdown {
/**
* If the dropdown should be disabled.
*/
"disabled": boolean;
/**
* The icon to show for the action.
*/
Expand Down Expand Up @@ -1464,6 +1468,10 @@ declare namespace LocalJSX {
* All child actions must have the `dropdownItem` prop set.
*/
interface EsActionDropdown {
/**
* If the dropdown should be disabled.
*/
"disabled"?: boolean;
/**
* The icon to show for the action.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,16 @@ import type { IconDescription } from '../../es-icon/types';
export class ESActionDropdown {
/** The icon to show for the action. */
@Prop() icon: IconDescription = [ICON_NAMESPACE, 'more'];
/** If the dropdown should be disabled. */
@Prop() disabled: boolean = false;

@State() dropdownOpen: boolean = false;

render() {
return (
<Host>
<es-button
disabled={this.disabled}
variant={'minimal'}
onClick={this.toggleDropdown}
onMouseDown={(e) => e.preventDefault()}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,10 @@ export default () => (

## Properties

| Property | Attribute | Description | Type | Default |
| -------- | --------- | -------------------------------- | ------------------------------------------------------- | -------------------------- |
| `icon` | `icon` | The icon to show for the action. | `[namespace: string \| symbol, name: string] \| string` | `[ICON_NAMESPACE, 'more']` |
| Property | Attribute | Description | Type | Default |
| ---------- | ---------- | ----------------------------------- | ------------------------------------------------------- | -------------------------- |
| `disabled` | `disabled` | If the dropdown should be disabled. | `boolean` | `false` |
| `icon` | `icon` | The icon to show for the action. | `[namespace: string \| symbol, name: string] \| string` | `[ICON_NAMESPACE, 'more']` |


## Dependencies
Expand Down

0 comments on commit 59d3f19

Please sign in to comment.