Skip to content

Commit

Permalink
docs(typography): Add a message to Sup/Sub component to denote they a…
Browse files Browse the repository at this point in the history
…re sub components
  • Loading branch information
lzcabrera committed Sep 5, 2017
1 parent e94a9c0 commit 8cc4c88
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ import styles from '../DisplayHeading.modules.scss'

/**
* Subscript text for headings.
*
* _This component can only be accessed as a name-spaced component: `DisplayHeading.Sub`._
*
*/
const DisplayHeadingSub = ({ children, ...rest }) => (
<sub {...safeRest(rest)} className={styles.sub}>{children}</sub>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ import styles from '../DisplayHeading.modules.scss'

/**
* Superscript text for headings.
*
* _This component can only be accessed as a name-spaced component: `DisplayHeading.Sup`._
*
*/
const DisplayHeadingSup = ({ children, ...rest }) => (
<sup {...safeRest(rest)} className={styles.sup}>{children}</sup>
Expand Down
3 changes: 3 additions & 0 deletions src/components/Typography/Heading/HeadingSub/HeadingSub.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ import styles from '../Heading.modules.scss'

/**
* Subscript text for headings.
*
* _This component can only be accessed as a name-spaced component: `Heading.Sub`._
*
*/
const HeadingSub = ({ children, ...rest }) => (
<sub {...safeRest(rest)} className={styles.sub}>{children}</sub>
Expand Down
3 changes: 3 additions & 0 deletions src/components/Typography/Heading/HeadingSup/HeadingSup.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ import styles from '../Heading.modules.scss'

/**
* Superscript text for headings.
*
* _This component can only be accessed as a name-spaced component: `Heading.Sup`._
*
*/
const HeadingSup = ({ children, ...rest }) => (
<sup {...safeRest(rest)} className={styles.sup}>{children}</sup>
Expand Down
3 changes: 3 additions & 0 deletions src/components/Typography/Text/TextSub/TextSub.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ import styles from '../Text.modules.scss'

/**
* Text that should be displayed lower than the main text (subscript).
*
* _This component can only be accessed as a name-spaced component: `Text.Sub`._
*
*/
const TextSub = ({ children, ...rest }) => (
<sub {...safeRest(rest)} className={styles.sub}>{children}</sub>
Expand Down
3 changes: 3 additions & 0 deletions src/components/Typography/Text/TextSup/TextSup.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ import styles from '../Text.modules.scss'

/**
* Text that should be displayed higher than the main text (superscript).
*
* _This component can only be accessed as a name-spaced component: `Text.Sup`._
*
*/
const TextSup = ({ children, ...rest }) => (
<sup {...safeRest(rest)} className={styles.sup}>{children}</sup>
Expand Down

0 comments on commit 8cc4c88

Please sign in to comment.