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 53
fix(Button): Implementing Contrast Theme and Updating Dark Theme #381
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
3b444e2
implementing contrast theme with necessary changes to buttonStyles
bcalvery 0b052e9
Merge branch 'master' of https://github.com/stardust-ui/react into fi…
bcalvery e6b8c4f
removing border shorthand
bcalvery d4bf016
merge from master
bcalvery 6bf8201
update changelog
bcalvery 490df3b
Refactoring buttonStyles to be a little more organized.
bcalvery 7e5676f
Merge branch 'master' into fix/buttons-contrasttheme
alinais c1f1aaf
Merge branch 'master' into fix/buttons-contrasttheme
alinais 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
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,3 +1,7 @@ | ||
export { default as Avatar } from './components/Avatar/avatarVariables' | ||
|
||
export { default as Button } from './components/Button/buttonVariables' | ||
|
||
export { default as Divider } from './components/Divider/dividerVariables' | ||
|
||
export { default as Text } from './components/Text/textVariables' |
55 changes: 55 additions & 0 deletions
55
src/themes/teams-high-contrast/components/Button/buttonVariables.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 |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import { ButtonVariables } from '../../../teams/components/Button/buttonVariables' | ||
import { Partial } from 'types/utils' | ||
|
||
export default (siteVars: any): Partial<ButtonVariables> => { | ||
return { | ||
color: siteVars.white, | ||
colorDisabled: siteVars.black, | ||
backgroundColor: 'transparent', | ||
backgroundColorActive: siteVars.accessibleYellow, | ||
backgroundColorHover: siteVars.accessibleYellow, | ||
backgroundColorFocus: siteVars.accessibleYellow, | ||
backgroundColorDisabled: siteVars.accessibleGreen, | ||
borderColor: siteVars.white, | ||
borderColorActive: 'transparent', | ||
borderColorHover: 'transparent', | ||
borderColorFocus: siteVars.black, | ||
borderColorFocusIndicator: siteVars.white, | ||
|
||
primaryColor: siteVars.white, | ||
primaryColorActive: siteVars.black, | ||
primaryColorHover: siteVars.black, | ||
primaryColorFocus: siteVars.black, | ||
primaryBackgroundColor: siteVars.black, | ||
primaryBackgroundColorActive: siteVars.accessibleYellow, | ||
primaryBackgroundColorHover: siteVars.accessibleYellow, | ||
primaryBackgroundColorFocus: siteVars.accessibleYellow, | ||
primaryBorderColor: siteVars.white, | ||
primaryBorderColorFocus: siteVars.black, | ||
primaryBorderColorFocusIndicator: siteVars.white, | ||
primaryBorderWidth: 2, | ||
|
||
primaryCircularBorderColorFocusIndicator: siteVars.black, | ||
|
||
circularColor: siteVars.white, | ||
circularColorActive: siteVars.black, | ||
circularBackgroundColor: siteVars.black, | ||
circularBackgroundColorActive: siteVars.accessibleYellow, | ||
circularBackgroundColorHover: siteVars.accessibleYellow, | ||
circularBackgroundColorFocus: siteVars.accessibleYellow, | ||
circularBorderColor: siteVars.white, | ||
circularBorderColorActive: siteVars.white, | ||
circularBorderColorHover: siteVars.white, | ||
circularBorderColorFocus: siteVars.white, | ||
circularBorderColorFocusIndicator: siteVars.black, | ||
|
||
textColor: siteVars.accessibleYellow, | ||
textColorHover: siteVars.accessibleYellow, | ||
textPrimaryColor: siteVars.accessibleYellow, | ||
textPrimaryColorHover: siteVars.accessibleYellow, | ||
textSecondaryColor: siteVars.accessibleYellow, | ||
textSecondaryColorHover: siteVars.accessibleYellow, | ||
|
||
boxShadow: 'none', | ||
} | ||
} |
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: next line "says" the same thing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have these comments in all the file, not only here. We can consider it as part of some cleanup task.