Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions packages/dataviews/src/dataviews/stories/fixtures.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -619,8 +619,7 @@ export const data: SpaceObject[] = [
export const actions: Action< SpaceObject >[] = [
{
id: 'delete',
label: 'Delete item',
isPrimary: true,
label: 'Delete',
icon: trash,
modalHeader: ( items ) =>
items.length > 1
Expand Down Expand Up @@ -657,11 +656,15 @@ export const actions: Action< SpaceObject >[] = [
},
},
{
id: 'secondary',
label: 'Secondary action',
callback() {
// eslint-disable-next-line no-console
console.log( 'Perform secondary action.' );
id: 'view',
label: 'View',
isPrimary: true,
callback: ( items ) => {
const item = items[ 0 ];
// eslint-disable-next-line no-alert
alert(
`View item: "${ item.name.title }"\n\n${ item.name.description }`
);
},
},
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ export const orderEventFields: Field< OrderEvent >[] = [
export const orderEventActions: Action< OrderEvent >[] = [
{
id: 'view-note',
label: 'View Item',
label: 'View',
isPrimary: true,
icon: link,
isEligible: ( item ) => item.type === 'note',
Expand All @@ -523,8 +523,7 @@ export const orderEventActions: Action< OrderEvent >[] = [
},
{
id: 'delete-note',
label: 'Delete Note',
isPrimary: false,
label: 'Delete',
icon: trash,
isEligible: ( item ) => item.type === 'note',
modalHeader: ( items ) =>
Expand Down
Loading