This repository was archived by the owner on Mar 4, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 51
fix(SplitButton): Updating splitButton component to match Teams redlines #2108
Merged
Merged
Changes from all commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
a12a600
updating splitbutton
notandrew 3a11b5b
putting the border on the content instead of container
notandrew 91319cf
Merge branch 'master' into fix/splitbutton-styles
notandrew 63a3f82
adding small button
notandrew b40ae4f
adding small documentation
notandrew bbb72db
Merge branch 'master' into fix/splitbutton-styles
notandrew 14ea6d6
fixing styles for split button
notandrew 161877c
updating changelog
notandrew f1dc15a
merge
notandrew 86fcbb2
Merge branch 'master' into fix/splitbutton-styles
notandrew d32fcc1
updating button
notandrew 3b372ba
Merge branch 'master' into fix/splitbutton-styles
notandrew b150d8d
fixing styles
notandrew 5bb1d2f
Merge branch 'master' into fix/splitbutton-styles
notandrew ca1b853
updating focus state
notandrew 9ef45a2
Merge branch 'master' into fix/splitbutton-styles
notandrew c1b5322
updating proptypes
notandrew 564dc93
Merge branch 'master' into fix/splitbutton-styles
notandrew 2cb4502
Merge branch 'master' into fix/splitbutton-styles
notandrew 5eb3933
Merge branch 'master' into fix/splitbutton-styles
notandrew e6a51e0
updating changelog
notandrew cab4a43
updating small boolean to a size string
notandrew 6946d61
fixing merge
notandrew 995eb26
fixing border width
notandrew aed62a7
fixing focus state so it shows only on keyboard focus
notandrew 00b6da0
Merge branch 'master' into fix/splitbutton-styles
notandrew de4b451
updating changelog
notandrew 5361fcb
updating changelog
notandrew 2ba338d
fixing merge
notandrew 2b48923
updating split button's icon after fluent rename
notandrew 88e1a75
fixing changelog
notandrew a8e0be7
Update docs/src/examples/components/SplitButton/Types/index.tsx
notandrew 8cbe27b
Update CHANGELOG.md
notandrew e555eae
udpating size to SizeValue
notandrew 4c1ae34
updating size to SizeValue
notandrew 153b6db
missed a size.
notandrew d315862
updating changelog
notandrew 80c6323
fixing merge
notandrew 6d63f59
Merge branch 'master' into fix/splitbutton-styles
notandrew cae5a58
updating toggle button example to use proper icon
notandrew 4b21c92
Merge branch 'master' into fix/splitbutton-styles
notandrew File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
docs/src/examples/components/SplitButton/Types/SplitButtonExampleSmall.shorthand.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| import * as React from 'react' | ||
| import { SplitButton } from '@fluentui/react' | ||
|
|
||
| const SplitButtonExampleSmallShorthand = () => ( | ||
| <> | ||
| <SplitButton | ||
| menu={[ | ||
| { key: 'group', content: 'New group message' }, | ||
| { key: 'channel', content: 'New channel message' }, | ||
| ]} | ||
| button={{ | ||
| content: 'small', | ||
| 'aria-roledescription': 'splitbutton', | ||
| 'aria-describedby': 'instruction-message', | ||
| }} | ||
| size="small" | ||
| toggleButton={{ 'aria-label': 'expand options menu' }} | ||
| onMainButtonClick={() => alert('button was clicked')} | ||
| /> | ||
| <span aria-hidden="true" id="instruction-message" style={{ opacity: 0 }}> | ||
| to open menu, press Alt + Arrow Down | ||
| </span> | ||
| </> | ||
| ) | ||
|
|
||
| export default SplitButtonExampleSmallShorthand |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
98 changes: 71 additions & 27 deletions
98
packages/react/src/themes/teams/components/SplitButton/splitButtonStyles.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 13 additions & 14 deletions
27
packages/react/src/themes/teams/components/SplitButton/splitButtonVariables.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,29 +1,28 @@ | ||
| import { SiteVariablesPrepared } from '../../../types' | ||
|
|
||
| import { pxToRem } from '../../../../utils' | ||
|
|
||
| export interface SplitButtonVariables { | ||
| borderRadius: string | ||
| backgroundColorFocus: string | ||
| boxShadow: string | ||
| borderColorPrimary: string | ||
| borderColor: string | ||
| colorFocus: string | ||
| primaryBackgroundColorFocus: string | ||
| primaryColorFocus: string | ||
| borderColorDisabled: string | ||
| smallDimension: string | ||
notandrew marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| smallPadding: string | ||
| smallMinWidth: string | ||
| smallBoxShadow: string | ||
| padding: string | ||
| iconMargin: string | ||
| } | ||
|
|
||
| export default (siteVars: SiteVariablesPrepared): SplitButtonVariables => { | ||
| return { | ||
| borderRadius: siteVars.borderRadius, | ||
| backgroundColorFocus: siteVars.colors.grey[200], | ||
| boxShadow: siteVars.shadowLevel1, | ||
| borderColor: siteVars.colors.grey[200], | ||
| colorFocus: siteVars.colors.grey[750], | ||
| primaryBackgroundColorFocus: siteVars.colors.brand[800], | ||
| primaryColorFocus: siteVars.colors.white, | ||
| borderColor: siteVars.colorScheme.default.border, | ||
| borderColorPrimary: siteVars.colors.brand[500], | ||
notandrew marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| borderColorDisabled: siteVars.colorScheme.brand.foregroundDisabled, | ||
| smallDimension: pxToRem(24), | ||
| smallPadding: `0 ${pxToRem(8)}`, | ||
| smallMinWidth: '0', | ||
| smallBoxShadow: 'none', | ||
| padding: `0 ${pxToRem(16)}`, | ||
| iconMargin: `0 0 ${pxToRem(8)} 0`, | ||
| } | ||
| } | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.