Guest User

Untitled

a guest
Feb 20th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. import React from 'react';
  2.  
  3. import styled from 'styled-components';
  4.  
  5. // Create a <Title> react component that renders an <h1> which is
  6. // centered, palevioletred and sized at 1.5em
  7. const Title = styled.h1`
  8. font-size: 1.5em;
  9. text-align: center;
  10. color: palevioletred;
  11. `;
  12.  
  13. // Create a <Wrapper> react component that renders a <section> with
  14. // some padding and a papayawhip background
  15. const Wrapper = styled.section`
  16. padding: 4em;
  17. background: papayawhip;
  18. `;
  19.  
  20. // Use them like any other React component – except they're styled!
  21. <Wrapper>
  22. <Title>Hello World, this is my first styled component!</Title>
  23. </Wrapper>
Add Comment
Please, Sign In to add comment