forked from microsoft/fluentui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(react-infobutton): Adding size prop, HCM styles, and updating st…
…yles to match design spec (microsoft#25519) * updating styles and adding size prop * updating comment * adding requested changes
- Loading branch information
1 parent
d6d71b5
commit 7cd1361
Showing
8 changed files
with
157 additions
and
31 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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 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