-
Notifications
You must be signed in to change notification settings - Fork 2.9k
feat(react-infobutton): Adding size prop, HCM styles, and updating styles to match design spec #25519
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
sopranopillow
merged 3 commits into
microsoft:master
from
sopranopillow:infobutton/styles
Nov 10, 2022
Merged
feat(react-infobutton): Adding size prop, HCM styles, and updating styles to match design spec #25519
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
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
3 changes: 0 additions & 3 deletions
3
...ges/react-components/react-infobutton/src/components/InfoButton/DefaultInfoButtonIcon.tsx
This file was deleted.
Oops, something went wrong.
13 changes: 13 additions & 0 deletions
13
...es/react-components/react-infobutton/src/components/InfoButton/DefaultInfoButtonIcons.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,13 @@ | ||
| import { | ||
| Info12Regular, | ||
| Info12Filled, | ||
| Info16Regular, | ||
| Info16Filled, | ||
| Info20Regular, | ||
| Info20Filled, | ||
| bundleIcon, | ||
| } from '@fluentui/react-icons'; | ||
|
|
||
| export const DefaultInfoButtonIcon12 = bundleIcon(Info12Filled, Info12Regular); | ||
| export const DefaultInfoButtonIcon16 = bundleIcon(Info16Filled, Info16Regular); | ||
| export const DefaultInfoButtonIcon20 = bundleIcon(Info20Filled, Info20Regular); |
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
56 changes: 56 additions & 0 deletions
56
packages/react-components/react-infobutton/src/stories/Infobutton/InfoButtonSize.stories.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,56 @@ | ||
| import * as React from 'react'; | ||
| import { InfoButton } from '@fluentui/react-infobutton'; | ||
| import { Link, makeStyles, shorthands } from '@fluentui/react-components'; | ||
|
|
||
| const useStyles = makeStyles({ | ||
| base: { | ||
| alignItems: 'start', | ||
| display: 'flex', | ||
| flexDirection: 'column', | ||
| ...shorthands.gap('80px'), | ||
| ...shorthands.padding('20px'), | ||
| }, | ||
| }); | ||
|
|
||
| export const Size = () => { | ||
| const styles = useStyles(); | ||
|
|
||
| return ( | ||
| <div className={styles.base}> | ||
| <InfoButton | ||
| size="small" | ||
| content={ | ||
| <> | ||
| This is example content for a small InfoButton. <Link href="https://react.fluentui.dev">Learn more</Link>. | ||
| </> | ||
| } | ||
| /> | ||
|
|
||
| <InfoButton | ||
| size="medium" | ||
| content={ | ||
| <> | ||
| This is example content for a medium InfoButton. <Link href="https://react.fluentui.dev">Learn more</Link>. | ||
| </> | ||
| } | ||
| /> | ||
|
|
||
| <InfoButton | ||
| size="large" | ||
| content={ | ||
| <> | ||
| This is example content for a large InfoButton. <Link href="https://react.fluentui.dev">Learn more</Link>. | ||
| </> | ||
| } | ||
| /> | ||
| </div> | ||
| ); | ||
| }; | ||
|
|
||
| Size.parameters = { | ||
| docs: { | ||
| description: { | ||
| story: 'An InfoButton supports a range of sizes from small to large. The default is medium.', | ||
| }, | ||
| }, | ||
| }; |
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.
Uh oh!
There was an error while loading. Please reload this page.