Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support different kinds of button without variants #1751

Merged
merged 2 commits into from
May 28, 2021

Conversation

agubler
Copy link
Member

@agubler agubler commented May 27, 2021

Type: feature

The following has been addressed in the PR:

  • There is a related issue
  • All code matches the style guide
  • Unit tests are included in the PR
  • For new widgets, an entry has been added to the .dojorc
  • For new widgets, theme.variant() is added to the root domnode
  • Any widget variant uses theme.compose like this
  • WidgetProperties are exported

Description:

This change repurposes the kind property of the Button to define the actual different kinds of button i.e. outlined, text and contained as per the material spec. The existing behaviour for kind in the button has been removed, as the primary and secondary colour are not a "kind". In the future we will look at whether we implement a property to control colour.

kind will be the consistent approach to supporting variants such as outlined, and will update the card and other places to reflect this.

This is a breaking changes as RaisedButton and OutlinedButton no longer exist and the default button style is Contained (aka Raised).

@vercel
Copy link

vercel bot commented May 27, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.

widget-test-docs – ./

🔍 Inspect: https://vercel.com/dojo/widget-test-docs/7KG6219xseo9uQp3AuRNHAs33HKx
✅ Preview: https://widget-test-docs-git-fork-agubler-proper-kinds-dojo1.vercel.app

dojo.widgets – ./

🔍 Inspect: https://vercel.com/dojo/dojo.widgets/5QDYMw6jSbPjxLb8hE63fyvKFi3M
✅ Preview: https://dojowidgets-git-fork-agubler-proper-kinds-dojo1.vercel.app

@codecov
Copy link

codecov bot commented May 27, 2021

Codecov Report

Merging #1751 (4d121b0) into master (d09d090) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1751      +/-   ##
==========================================
- Coverage   90.55%   90.54%   -0.02%     
==========================================
  Files          96       94       -2     
  Lines        5220     5193      -27     
  Branches     1419     1418       -1     
==========================================
- Hits         4727     4702      -25     
  Misses        241      241              
+ Partials      252      250       -2     
Impacted Files Coverage Δ
src/floating-action-button/index.tsx 100.00% <ø> (ø)
src/accordion/index.tsx 100.00% <100.00%> (ø)
src/button/index.tsx 86.79% <100.00%> (+3.15%) ⬆️

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 d09d090...4d121b0. Read the comment docs.

@agubler agubler merged commit c684b35 into dojo:master May 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants