|
| 1 | +/* eslint react/no-multi-comp: 0, react/prop-types: 0 */ |
| 2 | +import React from 'react'; |
| 3 | +import { PrismCode } from 'react-prism'; |
| 4 | +import Helmet from 'react-helmet'; |
| 5 | + |
| 6 | +import MediaExample from '../examples/Media'; |
| 7 | +const MediaExampleSource = require('!!raw!../examples/Media.jsx'); |
| 8 | + |
| 9 | +import MediaNestedExample from '../examples/MediaNested'; |
| 10 | +const MediaNestedExampleSource = require('!!raw!../examples/MediaNested.jsx'); |
| 11 | + |
| 12 | +import MediaAlignmentExample from '../examples/MediaAlignment'; |
| 13 | +const MediaAlignmentExampleSource = require('!!raw!../examples/MediaAlignment.jsx'); |
| 14 | + |
| 15 | +import MediaListExample from '../examples/MediaList'; |
| 16 | +const MediaListExampleSource = require('!!raw!../examples/MediaList.jsx'); |
| 17 | + |
| 18 | +export default class MediaPage extends React.Component { |
| 19 | + render() { |
| 20 | + return ( |
| 21 | + <div> |
| 22 | + <Helmet title="Media object" /> |
| 23 | + <h3>Media object</h3> |
| 24 | + <div className="docs-example"> |
| 25 | + <MediaExample /> |
| 26 | + </div> |
| 27 | + <pre> |
| 28 | + <PrismCode className="language-jsx"> |
| 29 | + {MediaExampleSource} |
| 30 | + </PrismCode> |
| 31 | + </pre> |
| 32 | + <h4>Properties</h4> |
| 33 | + <pre> |
| 34 | + <PrismCode className="language-jsx"> |
| 35 | +{`Media.propTypes = { |
| 36 | + body: PropTypes.bool, |
| 37 | + bottom: PropTypes.bool, |
| 38 | + children: PropTypes.node, |
| 39 | + className: PropTypes.string, |
| 40 | + heading: PropTypes.bool, |
| 41 | + left: PropTypes.bool, |
| 42 | + list: PropTypes.bool, |
| 43 | + middle: PropTypes.bool, |
| 44 | + object: PropTypes.bool, |
| 45 | + right: PropTypes.bool, |
| 46 | + tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), |
| 47 | + top: PropTypes.bool, |
| 48 | +};`} |
| 49 | + </PrismCode> |
| 50 | + </pre> |
| 51 | + <h4>Nesting</h4> |
| 52 | + <div className="docs-example"> |
| 53 | + <MediaNestedExample /> |
| 54 | + </div> |
| 55 | + <pre> |
| 56 | + <PrismCode className="language-jsx"> |
| 57 | + {MediaNestedExampleSource} |
| 58 | + </PrismCode> |
| 59 | + </pre> |
| 60 | + <h4>Alignment</h4> |
| 61 | + <div className="docs-example"> |
| 62 | + <MediaAlignmentExample /> |
| 63 | + </div> |
| 64 | + <pre> |
| 65 | + <PrismCode className="language-jsx"> |
| 66 | + {MediaAlignmentExampleSource} |
| 67 | + </PrismCode> |
| 68 | + </pre> |
| 69 | + <h4>Media list</h4> |
| 70 | + <div className="docs-example"> |
| 71 | + <MediaListExample /> |
| 72 | + </div> |
| 73 | + <pre> |
| 74 | + <PrismCode className="language-jsx"> |
| 75 | + {MediaListExampleSource} |
| 76 | + </PrismCode> |
| 77 | + </pre> |
| 78 | + </div> |
| 79 | + ); |
| 80 | + } |
| 81 | +} |
0 commit comments