How to use the terra-button.ButtonVariants.EMPHASIS function in terra-button

To help you get started, we’ve selected a few terra-button examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cerner / terra-framework / packages / terra-notification-dialog / src / NotificationDialog.jsx View on Github external
const actionSection = (acceptAction, rejectAction, buttonOrder, emphasizedAction) => {
  let acceptButton = null;
  let rejectButton = null;
  if (!acceptAction && !rejectAction) {
    return null;
  }
  if (acceptAction) {
    acceptButton = (emphasizedAction === 'accept')
      ? <button>
      : </button><button>;
  }
  if (rejectAction) {
    rejectButton = (emphasizedAction === 'reject')
      ? </button><button>
      : </button><button>;
  }

  if (buttonOrder === 'rejectFirst') {
    return (
      <div>
        {rejectButton}
        {acceptButton}
      </div>
    );
  }

  return (
    <div>
      {acceptButton}
      {rejectButton}</div></button>

terra-button

The terra-button component provides users a way to trigger actions in the UI.

Apache-2.0
Latest version published 6 months ago

Package Health Score

57 / 100
Full package analysis