Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

feat(menu): Vertical Pills menu #36

Merged
merged 3 commits into from
Aug 3, 2018
Merged

Conversation

miroslavstastny
Copy link
Member

@miroslavstastny miroslavstastny commented Aug 1, 2018

Menu

Add support for <Menu vertical shape="pills">

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

vertical shape="pills"

image

vertical shape="pills" type="primary"

image

<Menu vertical shape="pills">
  <Menu.Item vertical shape="pills" name='inbox' active={activeItem === 'inbox'} onClick={this.handleItemClick}>
    Inbox
  </Menu.Item>

  <Menu.Item vertical shape="pills" name='spam' active={activeItem === 'spam'} onClick={this.handleItemClick}>
    Spam
  </Menu.Item>

  <Menu.Item vertical shape="pills" name='updates' active={activeItem === 'updates'} onClick={this.handleItemClick}>
    Updates
  </Menu.Item>
</Menu>

@codecov
Copy link

codecov bot commented Aug 1, 2018

Codecov Report

Merging #36 into master will decrease coverage by 0.09%.
The diff coverage is 50%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master      #36     +/-   ##
=========================================
- Coverage   83.94%   83.84%   -0.1%     
=========================================
  Files          58       58             
  Lines         872      873      +1     
  Branches      196      208     +12     
=========================================
  Hits          732      732             
- Misses        136      137      +1     
  Partials        4        4
Impacted Files Coverage Δ
src/components/Menu/menuItemRules.ts 85.71% <50%> (-3.18%) ⬇️

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 0f6fce0...8e7ee5c. Read the comment docs.

@@ -42,7 +42,7 @@ export default {
cursor: 'pointer',
display: 'block',
...(shape === 'pills' && {
margin: `0 ${pxToRem(8)} 0 0`,
...(vertical ? { margin: `0 0 ${pxToRem(5)} 0` } : { margin: `0 ${pxToRem(8)} 0 0` }),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should make the margin consistent for the pills menu for the vertical and horizontal type, both to be 5px or 8 px whatever you think looks better.

@kuzhelov kuzhelov changed the title feat(menu): Vertical Pills menu [CONFIRM MERGE] feat(menu): Vertical Pills menu Aug 3, 2018
@kuzhelov kuzhelov changed the title [CONFIRM MERGE] feat(menu): Vertical Pills menu feat(menu): Vertical Pills menu Aug 3, 2018
@kuzhelov kuzhelov merged commit dfb30a8 into master Aug 3, 2018
@kuzhelov kuzhelov deleted the feat/menu-vertical-pills branch August 8, 2018 19:52
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.

None yet

4 participants