Question about parameters of ActionButton

, ,

What do className, label, and role in the MenuOverlay examples mean?

The document says that these properties is similar to ActionButton, but they are not explained in ActionButton page.

Hello,

Thank you for contacting us about WebViewer. For those properties:

  • className: will be added to the “class” attribute of the DOM element. You can use this to style the element, see our style guide for more details about styling elements in WebViewer
  • label: is the text that appear for the button in the menu overlay when it’s appears
  • role: is the role attributre that can be used for a few different cases (mainly accessibility but there are a few other)

Please let me know if the above help or if you want me to clarify anything

Best Regards,

Andrew Yip
Software Developer
PDFTron Systems, Inc.
www.pdftron.com

1 Like

Thank you! The answer is clear.

One more question:
Is there any interface of ActionButton or those properties?

Hello,

Unfortunately we don’t have an interface to use for ActionButton yet. We are slowing moving more of our code base to TypeScript so we hopefully will have proper type for more of our input parameter in the future

Best Regards,

Andrew Yip
Software Developer
PDFTron Systems, Inc.
www.pdftron.com