Skip to content

Commit

Permalink
pkp/pkp-lib#10033 Add validator for direction prop
Browse files Browse the repository at this point in the history
  • Loading branch information
blesildaramirez committed Jun 20, 2024
1 parent 21336e1 commit ef172cf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/components/DropdownActions/DropdownActions.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export const Default = {
args: {
actions: downloadActions,
label: 'Download Review Form',
direction: 'left',
},
play: async ({canvasElement}) => {
// Assigns canvas to the component root element
Expand Down Expand Up @@ -90,6 +91,7 @@ export const EllipsisMenu = {
],
label: 'User management options',
displayAsEllipsis: true,
direction: 'left',
},
play: async ({canvasElement}) => {
// Assigns canvas to the component root element
Expand Down
3 changes: 2 additions & 1 deletion src/components/DropdownActions/DropdownActions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,11 @@ defineProps({
type: String,
default: '',
},
/** This specifies where the dropdown appears relative to the element, such as "left," or "right." */
/** This specifies where the dropdown appears relative to the element, such as "left" or "right." */
direction: {
type: String,
default: 'left',
validator: (direction) => ['left', 'right'].includes(direction),
},
});
Expand Down

0 comments on commit ef172cf

Please sign in to comment.