-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Dialog: Converting to mergeStyles part 2 - style conversion #4160
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
Merged
jordandrako
merged 30 commits into
microsoft:master
from
jordandrako:mergeStyles/Dialog-round2
Mar 8, 2018
Merged
Changes from 16 commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
d76623c
Convert scss to styles.ts (no classNames yet)
d9b291a
Merge branch 'master' into mergeStyles/Dialog-round2
f972e51
Use getStyles in base component.
1a397be
Add base component class names
7d19bfc
Make styles required.
f064341
Merge branch 'master' into mergeStyles/Dialog-round2
aeb08ac
Separate DialogContent styles and types
bfae0d8
Move DialogContent className logic to styles file.
8040803
Organize props
31b3042
Split DialogFooter styles and types
0ce1028
Comment and deprecate some props
98c4e55
Support isMultiline prop and clean up
3c4fb59
private _className method
1629127
npm run change output
70299f6
Update snapshot
e710070
Merge branch 'master' into mergeStyles/Dialog-round2
1110148
Simplify styles conditionals
6a5a186
Delete sass file
0264027
Add fallbacks for className checks.
7b010f7
Simplify stylesets with no styles
19ddc64
Move default width variables to style props.
da04eaa
better className fallbacks
23e506f
nit
f6bddf4
Fix font weight.
df40d50
merge master
caa8e30
Add className to footer and fix type issues.
5ad8158
Fix more type errors
9c6a1de
Merge branch 'master' into mergeStyles/Dialog-round2
2639ac2
Add hoistStatics function to @withResponsiveMode decorator
a0eb0d6
npm run change output
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
11 changes: 11 additions & 0 deletions
11
common/changes/office-ui-fabric-react/mergeStyles-Dialog-round2_2018-03-02-01-05.json
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,11 @@ | ||
| { | ||
| "changes": [ | ||
| { | ||
| "packageName": "office-ui-fabric-react", | ||
| "comment": "Dialog: convert to mergeStyles part 2.", | ||
| "type": "minor" | ||
| } | ||
| ], | ||
| "packageName": "office-ui-fabric-react", | ||
| "email": "v-jojanz@microsoft.com" | ||
| } |
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 |
|---|---|---|
|
|
@@ -2,27 +2,44 @@ import { IDialogStyleProps, IDialogStyles } from './Dialog.types'; | |
| import { | ||
| IStyle, | ||
| ITheme, | ||
| FontWeights, | ||
| ScreenWidthMinMedium, | ||
| } from '../../Styling'; | ||
|
|
||
| export const getStyles = ( | ||
| props: IDialogStyleProps | ||
| ): IDialogStyles => { | ||
| const { | ||
| className, | ||
| containerClassName, | ||
| contentClassName, | ||
| theme, | ||
| hidden, | ||
| } = props; | ||
|
|
||
| const { palette, semanticColors } = theme; | ||
| const dialogDefaultMinWidth = '288px'; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it might be better to make these a style prop you can pass the default in from base
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed. |
||
| const dialogDefaultMaxWidth = '340px'; | ||
|
|
||
| return ({ | ||
| root: [ | ||
| 'ms-Dialog', | ||
| { | ||
| // Insert css properties | ||
|
|
||
| } | ||
| className, | ||
| ], | ||
|
|
||
| // Insert className styles | ||
| main: [ | ||
| { | ||
| width: dialogDefaultMinWidth, | ||
|
|
||
| selectors: { | ||
| [`@media (min-width: ${ScreenWidthMinMedium}px)`]: { | ||
| width: 'auto', | ||
| maxWidth: dialogDefaultMaxWidth, | ||
| minWidth: dialogDefaultMinWidth, | ||
| } | ||
| } | ||
| }, | ||
| !hidden && { display: 'flex' }, | ||
| containerClassName, | ||
| ] | ||
| }); | ||
| }; | ||
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
Oops, something went wrong.
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.
These can be removed