How to use terra-button - 10 common examples

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-core / packages / terra-status-view / src / StatusView.jsx View on Github external
const StatusViewVariants = {
  NODATA: 'no-data',
  NOMATCHINGRESULTS: 'no-matching-results',
  NOTAUTHORIZED: 'not-authorized',
  ERROR: 'error',
};

/* eslint-disable react/forbid-foreign-prop-types */
const propTypes = {
  /**
   * An array of objects containing terra-button properties. A key attribute is required for each object.
   * This array is used to render buttons in the bottom section.
   * Example:`[{ text: 'Button 1', key: 1, size: 'medium', variant: 'action', onClick: onClickFunction}]`
   */
  buttonAttrs: PropTypes.arrayOf(PropTypes.shape(Button.propTypes)),

  /**
   * Display a custom glyph. Overrides a variant's default glyph.
   */
  customGlyph: PropTypes.node,

  /**
   *  Aligns the component at the top of the container rather than "centered"
   */
  isAlignedTop: PropTypes.bool,

  /**
   * Determines if the glyph should be displayed.
   */
  isGlyphHidden: PropTypes.bool,
github cerner / terra-framework / packages / terra-application-utility / src / utility / _UtilityMenu.jsx View on Github external
isIconOnly
        text={backText}
        variant={Button.Opts.Variants.UTILITY}
      />
    );

    const closeText = intl.formatMessage({ id: 'Terra.application.utility.close' });
    const closeButton = (
      <button>}
        isCompact
        isIconOnly
        aria-describedby="utility-menu-header"
        text={closeText}
        variant={Button.Opts.Variants.UTILITY}
        className={closeButtonClassNames}
      /&gt;
    );

    let headerText;
    if (currentItem !== undefined) {
      headerText = currentItem.title;
    }
    const header = (
      <div>
        <span>
          <span>
            {!firstPage &amp;&amp; backButton}
            <span aria-level="2" role="heading" id="utility-menu-header">{headerText}</span>
          </span>
          <span></span></span></div></button>
github cerner / terra-framework / packages / terra-form-validation / src / terra-dev-site / doc / example / ValidationOnSubmit.jsx View on Github external
validate={required}
              component={({ input }) =&gt; (
                
              )}
            /&gt;
          
        
        <button type="{Button.Opts.Types.SUBMIT}">
      
    );
  }
</button>
github cerner / terra-framework / packages / terra-form-validation / src / terra-dev-site / doc / example / ValidationAsynchronous.jsx View on Github external
&gt;
          {({ input, meta }) =&gt; (
             { input.onChange(e.target.value); }}
              inputAttrs={{ ...input }}
              value={input.value}
              required
            /&gt;
          )}
        
        <button type="{Button.Opts.Types.SUBMIT}">
      
    );
  }
</button>
github cerner / terra-framework / packages / terra-form-validation / src / terra-dev-site / doc / example / DefaultFormValidation.jsx View on Github external
{ input.onChange(e.target.value); }}
              value={input.value}
              required
            /&gt;
          )}
        
        <button type="{Button.Opts.Types.SUBMIT}">
        {this.state.submittedValues
          &amp;&amp; (
          <div>
            <p>Form Submitted Successfully With</p>
            <pre>{JSON.stringify(this.state.submittedValues, 0, 2)}</pre>
          </div>
          )}
      
    );
  }
</button>
github cerner / terra-framework / packages / terra-form-validation / src / terra-dev-site / doc / example / FormSubmitDatePicker.jsx View on Github external
{({ input, meta }) =&gt; (
            
               { input.onChange(date); }}
              /&gt;
            
          )}
        
        <button type="{Button.Opts.Types.SUBMIT}">
      
    );
  }
</button>
github cerner / terra-framework / packages / terra-form-validation / src / terra-dev-site / doc / example / MaxLengthInput.jsx View on Github external
{ input.onChange(e.target.value); }}
              value={input.value}
              required
            /&gt;
          )}
        
        <button type="{Button.Opts.Types.SUBMIT}">
      
    );
  }
</button>
github cerner / terra-core / packages / terra-date-time-picker / src / _TimeClarification.jsx View on Github external
{<h1>{title}</h1>}
            
            <div>
              <p>{message}</p>
            </div>
            <div>
              <button>
              </button><button>
            </button></div>
          
        
        <button>
      
    );
  }
}</button>
github cerner / terra-dev-site / src / navigation / _SettingsPicker.jsx View on Github external
const themes = Object.keys(config.themes);

    return (
      
        )}
        footer={(
          
                <spacer>
                  <button> {
                      onChangeSettings({
                        locale,
                        theme,
                        direction,
                      }, disclosureManager.dismiss);
                    }}
                  /&gt;
                
                </button><button id="cancel"> {
                    disclosureManager.dismiss();
                  }}
                /&gt;</button></spacer>
github cerner / terra-core / packages / terra-site / src / examples / toggle-button / ButtonAttrsToggleButton.jsx View on Github external
const ButtonAttrsToggleButton = () =&gt; (
  
    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
  
);

terra-button

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

Apache-2.0
Latest version published 7 months ago

Package Health Score

57 / 100
Full package analysis