Media object

Media - 图1

  1. import React from 'react';
  2. import { Media } from 'reactstrap';
  3. const Example = () => {
  4. return (
  5. <Media>
  6. <Media left href="#">
  7. <Media object data-src="holder.js/64x64" alt="Generic placeholder image" />
  8. </Media>
  9. <Media body>
  10. <Media heading>
  11. Media heading
  12. </Media>
  13. Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
  14. </Media>
  15. </Media>
  16. );
  17. };
  18. export default Example;

Properties

  1. Media.propTypes = {
  2. body: PropTypes.bool,
  3. bottom: PropTypes.bool,
  4. children: PropTypes.node,
  5. className: PropTypes.string,
  6. heading: PropTypes.bool,
  7. left: PropTypes.bool,
  8. list: PropTypes.bool,
  9. middle: PropTypes.bool,
  10. object: PropTypes.bool,
  11. right: PropTypes.bool,
  12. tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
  13. top: PropTypes.bool,
  14. };

Nesting

Media - 图2

  1. import React from 'react';
  2. import { Media } from 'reactstrap';
  3. const Example = () => {
  4. return (
  5. <Media>
  6. <Media left href="#">
  7. <Media object data-src="holder.js/64x64" alt="Generic placeholder image" />
  8. </Media>
  9. <Media body>
  10. <Media heading>
  11. Media heading
  12. </Media>
  13. Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
  14. <Media>
  15. <Media left href="#">
  16. <Media object data-src="holder.js/64x64" alt="Generic placeholder image" />
  17. </Media>
  18. <Media body>
  19. <Media heading>
  20. Nested media heading
  21. </Media>
  22. Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
  23. </Media>
  24. </Media>
  25. </Media>
  26. </Media>
  27. );
  28. };
  29. export default Example;

Alignment

Media - 图3

  1. import React from 'react';
  2. import { Media } from 'reactstrap';
  3. const Example = () => {
  4. return (
  5. <div>
  6. <Media>
  7. <Media left top href="#">
  8. <Media object data-src="holder.js/64x64" alt="Generic placeholder image" />
  9. </Media>
  10. <Media body>
  11. <Media heading>
  12. Top aligned media
  13. </Media>
  14. Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
  15. </Media>
  16. </Media>
  17. <Media className="mt-1">
  18. <Media left middle href="#">
  19. <Media object data-src="holder.js/64x64" alt="Generic placeholder image" />
  20. </Media>
  21. <Media body>
  22. <Media heading>
  23. Middle aligned media
  24. </Media>
  25. Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
  26. </Media>
  27. </Media>
  28. <Media className="mt-1">
  29. <Media left bottom href="#">
  30. <Media object data-src="holder.js/64x64" alt="Generic placeholder image" />
  31. </Media>
  32. <Media body>
  33. <Media heading>
  34. Bottom aligned media
  35. </Media>
  36. Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
  37. </Media>
  38. </Media>
  39. </div>
  40. );
  41. };
  42. export default Example;

Media list

  • 64x64

Media heading

Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.64x64

Nested media heading

Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.64x64

Nested media heading

Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.

64x64

Nested media heading

Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.

Media heading

Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.64x64

  1. import React from 'react';
  2. import { Media } from 'reactstrap';
  3. const Example = () => {
  4. return (
  5. <Media list>
  6. <Media tag="li">
  7. <Media left href="#">
  8. <Media object data-src="holder.js/64x64" alt="Generic placeholder image" />
  9. </Media>
  10. <Media body>
  11. <Media heading>
  12. Media heading
  13. </Media>
  14. Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
  15. <Media>
  16. <Media left href="#">
  17. <Media object data-src="holder.js/64x64" alt="Generic placeholder image" />
  18. </Media>
  19. <Media body>
  20. <Media heading>
  21. Nested media heading
  22. </Media>
  23. Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
  24. <Media>
  25. <Media left href="#">
  26. <Media object data-src="holder.js/64x64" alt="Generic placeholder image" />
  27. </Media>
  28. <Media body>
  29. <Media heading>
  30. Nested media heading
  31. </Media>
  32. Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
  33. </Media>
  34. </Media>
  35. </Media>
  36. </Media>
  37. <Media>
  38. <Media left href="#">
  39. <Media object data-src="holder.js/64x64" alt="Generic placeholder image" />
  40. </Media>
  41. <Media body>
  42. <Media heading>
  43. Nested media heading
  44. </Media>
  45. Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
  46. </Media>
  47. </Media>
  48. </Media>
  49. </Media>
  50. <Media tag="li">
  51. <Media body>
  52. <Media heading>
  53. Media heading
  54. </Media>
  55. Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
  56. </Media>
  57. <Media right href="#">
  58. <Media object data-src="holder.js/64x64" alt="Generic placeholder image" />
  59. </Media>
  60. </Media>
  61. </Media>
  62. );
  63. };
  64. export default Example;