Skip to content

Instantly share code, notes, and snippets.

@thomasthesecond
Created February 2, 2017 19:18
Show Gist options
  • Save thomasthesecond/3c294bf553896ce4477293272d097097 to your computer and use it in GitHub Desktop.
Save thomasthesecond/3c294bf553896ce4477293272d097097 to your computer and use it in GitHub Desktop.
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);
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