Terra-core: Uplift Button Component for OCS

Created on 28 Nov 2017  路  9Comments  路  Source: cerner/terra-core

Issue Description

Uplift Button component.

Issue Type

  • [ ] New Feature
  • [x] Enhancement
  • [ ] Bug
  • [ ] Other
terra-button Major Version Bump

Most helpful comment

We should add a refCallback prop for use with popup and menu.

All 9 comments

Button Tech Design

React Props:

Changed

  • variant prop [string] sets the button variant. See Question 1.

    • New options: 'default', 'utility', 'emphasis', 'de-emphasis', 'action' .



      • Note: 'action' and 'de-emphasis' are consumer specific.



    • Previous options: 'default', 'primary', 'secondary', 'link'

Removed

  • isCompact prop [bool]
  • size prop [string] Options: 'tiny', 'small', 'medium', 'large', 'huge'

Themeable Styles

  • Background color
  • Border color
  • Border radius
  • Border style
  • Box shadow
  • Font weight
  • Padding
  • Height

Responsiveness & Accessibility

None to consider for uplift.

Questions

  1. Designs indicate variant types of 'default', 'utility', 'emphasis', 'de-emphasis' and 'action'. Do we want to use these types or maintain the current types of 'primary', and 'secondary' in favor of 'emphasis' and 'de-emphasis'?

+1 on tech design, lets us the same names UX uses for the variants.
Do we need to remove the href prop. I know UX has talked about not having links look like buttons.

I agree with @bjankord about keeping the href prop

We should add a refCallback prop for use with popup and menu.

Shouldn't font-color, font-family, and font-size also be themeable, or are those inherited?
+1

@yuderekyu ^ These will be themeable but inherited

Orion JIRA created

Interesting information I've discovered for anyone interested:

screen shot 2017-12-01 at 10 41 37 am

  • ^ and Firefox on Windows 10 does not give focus on click.

Additionally, Firefox does not apply :active focus styling with keyboard interactions with the SPACE key.

Chrome (webkit, really) does some unexpected behavior with buttons when you click:
https://stackoverflow.com/questions/20340138/remove-blue-border-from-css-custom-styled-button-in-chrome

If we're going to be changing button, this might be a good thing to add.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

StephenEsser picture StephenEsser  路  5Comments

noahbenham picture noahbenham  路  4Comments

noahbenham picture noahbenham  路  5Comments

cwalten picture cwalten  路  6Comments

bjankord picture bjankord  路  3Comments