figma / plugin-typings

Typings for the Figma Plugin API
MIT License
190 stars 44 forks source link

Notification Button Action Not Working #284

Closed mikhin closed 5 months ago

mikhin commented 5 months ago

I am currently experiencing an issue with the NotificationOptions interface in my TypeScript project. The button property, which is supposed to trigger an action when clicked, does not seem to be working as expected.

Here is the interface definition for reference:

interface NotificationOptions {
  timeout?: number;
  error?: boolean;
  onDequeue?: (reason: NotifyDequeueReason) => void;
  button?: {
    text: string;
    action: () => boolean | void;
  };
}

When I do not pass the button property, the notify function works well and the notification is displayed. However, when I pass the button property, the notify function does not show any notification.

Any help or guidance on this issue would be greatly appreciated.

mikhin commented 5 months ago

oh, I think I got the repository wrong, this should probably have been posted here - https://github.com/figma/widget-typings

jefflee-figma commented 5 months ago

Thanks for the report. This is a bug with the Plugin API, rather than the plugin typings specifically. We've tracked this issue internally. Since this isn't a typings bug, I'm closing the issue.