Skip to content

Commit

Permalink
docs: Update Typography doc page
Browse files Browse the repository at this point in the history
  • Loading branch information
myxvisual committed Jun 14, 2017
1 parent 0730f90 commit 60d5485
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 25 deletions.
File renamed without changes.
1 change: 0 additions & 1 deletion docs/src/routes/Styles/Typography/README1.md

This file was deleted.

49 changes: 25 additions & 24 deletions docs/src/routes/Styles/Typography/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import * as PropTypes from "prop-types";

import MarkdownRender from "react-uwp/MarkdownRender";

import * as readmeDoc1 from "!raw!./README1.md";
import * as readmeDoc2 from "!raw!./README2.md";
import * as readmeDoc from "!raw!./README.md";

export interface DataProps {}

Expand Down Expand Up @@ -39,7 +38,7 @@ export default class Typography extends React.Component<TypographyProps, void> {
>
<p style={itemStyle}>{name}</p>
<p style={itemStyle}>{style.fontWeight}</p>
<p style={itemStyle}>{style.fontSize}px</p>
<p style={itemStyle}>{style.fontSize === "fontSize" ? "fontSize" : `${style.fontSize}px`}</p>
<p style={itemStyle}>{style.lineHeight}</p>
</div>;
}
Expand All @@ -56,28 +55,30 @@ export default class Typography extends React.Component<TypographyProps, void> {

return (
<div {...attributes}>
<MarkdownRender text={readmeDoc1 as any} />
<div>
<div style={groupStyle}>
{this.renderTypographyItem("header", theme.typographyStyles.header)}
{this.renderTypographyItem("subHeader", theme.typographyStyles.subHeader)}
</div>
<div style={groupStyle}>
{this.renderTypographyItem("title", theme.typographyStyles.title)}
{this.renderTypographyItem("subTitle", theme.typographyStyles.subTitle)}
{this.renderTypographyItem("subTitleAlt", theme.typographyStyles.subTitleAlt)}
</div>
<div style={groupStyle}>
{this.renderTypographyItem("base", theme.typographyStyles.base)}
{this.renderTypographyItem("baseAlt", theme.typographyStyles.baseAlt)}
{this.renderTypographyItem("body", theme.typographyStyles.body)}
</div>
<div style={groupStyle}>
{this.renderTypographyItem("captionAlt", theme.typographyStyles.captionAlt)}
{this.renderTypographyItem("caption", theme.typographyStyles.caption)}
</div>
<div style={groupStyle}>
{this.renderTypographyItem("", {
fontWeight: "fontWeight",
fontSize: "fontSize",
lineHeight: "lineHeight"
} as any)}
{this.renderTypographyItem("header", theme.typographyStyles.header)}
{this.renderTypographyItem("subHeader", theme.typographyStyles.subHeader)}
</div>
<MarkdownRender text={readmeDoc2 as any} />
<div style={groupStyle}>
{this.renderTypographyItem("title", theme.typographyStyles.title)}
{this.renderTypographyItem("subTitle", theme.typographyStyles.subTitle)}
{this.renderTypographyItem("subTitleAlt", theme.typographyStyles.subTitleAlt)}
</div>
<div style={groupStyle}>
{this.renderTypographyItem("base", theme.typographyStyles.base)}
{this.renderTypographyItem("baseAlt", theme.typographyStyles.baseAlt)}
{this.renderTypographyItem("body", theme.typographyStyles.body)}
</div>
<div style={groupStyle}>
{this.renderTypographyItem("captionAlt", theme.typographyStyles.captionAlt)}
{this.renderTypographyItem("caption", theme.typographyStyles.caption)}
</div>
<MarkdownRender text={readmeDoc as any} />
</div>
);
}
Expand Down

0 comments on commit 60d5485

Please sign in to comment.