Skip to content
This repository was archived by the owner on Jan 20, 2022. It is now read-only.

feat(Button): adding disabled prop to Button#114

Closed
bmdalex wants to merge 5 commits intomasterfrom
feat/button-disabled
Closed

feat(Button): adding disabled prop to Button#114
bmdalex wants to merge 5 commits intomasterfrom
feat/button-disabled

Conversation

@bmdalex
Copy link
Collaborator

@bmdalex bmdalex commented Jul 18, 2018

Button(disabled prop)

This PR will introduce possibility to specify disabled buttons

This PR depends on the changes introduced in #111 so it contains these as well; #111 should be merge first and then this branch should be rebased

TODO

  • Conformance test
  • Minimal doc site example
  • Stardust base theme
  • Teams Light theme
  • Teams Dark theme
  • Teams Contrast theme
  • Confirm RTL usage
  • W3 accessibility check
  • Stardust accessibility check
  • Update glossary props table
  • Update the CHANGELOG.md

API Proposal

disabled

disabled property will disable buttons by manipulating opacity CSS style, borders, colors, hover styles and preventing clicking

Know issue: Icons are not disabled because disabled property was not added to icons at the time of creating this PR. I created a PR for that #113
Icon buttons will become disabled out of the box after merging that one

screen shot 2018-07-18 at 21 31 15

<Button disabled content="Click me" />

will render

<button class="ui-button" disabled="">
  <span>Click me</span>
</button>

@codecov
Copy link

codecov bot commented Jul 18, 2018

Codecov Report

Merging #114 into master will decrease coverage by 0.02%.
The diff coverage is 77.96%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #114      +/-   ##
==========================================
- Coverage    69.8%   69.77%   -0.03%     
==========================================
  Files          75       76       +1     
  Lines        1202     1244      +42     
  Branches      228      221       -7     
==========================================
+ Hits          839      868      +29     
- Misses        358      371      +13     
  Partials        5        5
Impacted Files Coverage Δ
src/components/Icon/iconVariables.ts 100% <ø> (ø) ⬆️
src/components/Button/buttonVariables.ts 100% <ø> (ø) ⬆️
src/components/Icon/iconRules.ts 90.47% <ø> (ø) ⬆️
src/styles/customCSS.ts 100% <100%> (ø)
src/components/Button/Button.tsx 70.58% <68.75%> (-29.42%) ⬇️
src/components/Button/buttonRules.ts 91.66% <88%> (-8.34%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9b7f612...9a4fb9a. Read the comment docs.

@bmdalex
Copy link
Collaborator Author

bmdalex commented Jul 25, 2018

Moved to new repo: stardust-ui/react/pull/14

@bmdalex bmdalex closed this Jul 25, 2018
@bmdalex bmdalex deleted the feat/button-disabled branch July 25, 2018 16:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants