-
Notifications
You must be signed in to change notification settings - Fork 597
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
feat: add hypertext component #210
Changes from 1 commit
f063d64
a129d6a
0d262f5
209f428
ab94569
5037d28
99731f6
bdced4c
c4da12a
ad63c30
5c4b7f3
44ef96f
95f2f40
f274dfc
c825fdd
3e0f94c
c5cfa5a
3f1e52d
dad7b10
451c9ad
148ba95
5b28c9d
79d3549
1c68f4d
bd699e9
4ca8ea6
2159271
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import {ICategoryItemProps} from "@microsoft/fast-development-site-react"; | ||
import {IGenericExample} from "../examples"; | ||
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 you'll want to do a rebase and replace IGenericExample with ISnapshots.... Little bit of a refactor, unfortunately. |
||
import {IManagedClasses} from "@microsoft/fast-jss-manager-react"; | ||
import Hypertext from "./index"; | ||
import {IHypertextProps} from "@microsoft/fast-components-react-base"; | ||
|
||
export default { | ||
name: "hypertext", | ||
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. can you add an example that does not include an href? |
||
component: Hypertext, | ||
data: [ | ||
{ | ||
href: "https://msdn.microsoft.com", | ||
children: "Hyper text" | ||
} | ||
] | ||
} as IGenericExample<IHypertextProps>; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import * as React from "react"; | ||
import { Hypertext, IFoundationProps, IHypertextClassNameContract, IHypertextProps } from "@microsoft/fast-components-react-base"; | ||
import manageJss from "@microsoft/fast-jss-manager-react"; | ||
import {HypertextStyles} from "@microsoft/fast-components-styles-msft"; | ||
|
||
export default manageJss(HypertextStyles)(Hypertext); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import {IDesignSystem} from "../design-system"; | ||
import {ComponentStyles} from "@microsoft/fast-jss-manager"; | ||
import {IHypertextClassNameContract} from "@microsoft/fast-components-class-name-contracts"; | ||
|
||
const styles: ComponentStyles<IHypertextClassNameContract, IDesignSystem> = { | ||
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. let me know if you, kham, and Jeff want to jump on a session to do one of these. |
||
hypertext: { | ||
color: (config: IDesignSystem): string => { | ||
return config.foregroundColor; | ||
}, | ||
backgroundColor: (config: IDesignSystem): string => { | ||
return config.brandColor; | ||
} | ||
}, | ||
}; | ||
|
||
export default styles; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,9 @@ | |
import ButtonStyles from "./button"; | ||
export { ButtonStyles }; | ||
|
||
import HypertextStyles from "./hypertext"; | ||
export {HypertextStyles}; | ||
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 know it's not barking from a tslint standpoint, but can you follow the convention of including spaces on export statements? 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. yep, I knew about that just missed this one. Doh! |
||
|
||
/** | ||
* Export design system defaults and typings | ||
*/ | ||
|
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: spacing :)