Created
February 2, 2017 19:18
-
-
Save thomasthesecond/3c294bf553896ce4477293272d097097 to your computer and use it in GitHub Desktop.
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
import React, { PropTypes } from "react"; | |
import radium, { Style } from "radium"; | |
import { color } from "../../../settings.json"; | |
import font from "../../utils/font"; | |
const styles = { | |
color: color.detailHeaderSmall, | |
fontFamily: font("benton"), | |
fontSize: "11px", | |
lineHeight: (17 / 11), | |
}; | |
function markup(htmlContent) { | |
return { | |
__html: htmlContent, | |
}; | |
} | |
const DisclaimerText = ({ children, style }) => ( | |
<div className="DisclaimerText" style={[styles, style]}> | |
<Style rules={{ ".DisclaimerText a": { color: "inherit" } }} />; | |
<div dangerouslySetInnerHTML={markup(children)} /> | |
</div> | |
); | |
DisclaimerText.propTypes = { | |
children: PropTypes.node.isRequired, | |
style: PropTypes.objectOf(PropTypes.object), | |
}; | |
export default radium(DisclaimerText); |
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
import React, { PropTypes } from "react"; | |
import styled from "styled-components"; | |
import { color } from "../../../settings.json"; | |
import font from "../../utils/font"; | |
const DisclaimerText = styled.div` | |
color: ${color.detailHeaderSmall}; | |
font-family: ${font("benton")}; | |
font-size: 11px; | |
line-height: ${(17 / 11)}; | |
a { | |
color: inherit; | |
} | |
`; | |
DisclaimerText.defaultProps = { | |
className: "DisclaimerText", | |
}; | |
export default DisclaimerText; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment