Guest User

Untitled

a guest
Dec 11th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. // lib/blocks/Button/index.js
  2.  
  3. import { applyStyleModifiers } from 'styled-components-modifiers';
  4.  
  5. const modifierConfig = {
  6. primary: () => `
  7. background-color: #7E5BEF;
  8. `,
  9.  
  10. secondary: () => `
  11. background-color: #FFC82C;
  12. `,
  13.  
  14. disabled: () => `
  15. opacity: 50%;
  16. pointer-events: none;
  17. `,
  18. };
  19.  
  20. const Button = styled.button`
  21. background-color: #7D7D7D;
  22. border-radius: 2px;
  23. border: solid 1px transparent;
  24. color: #000;
  25. cursor: pointer;
  26. font-size: 1rem;
  27. padding: 0.5rem 1.5rem;
  28. outline: none;
  29. transition: all 200ms ease;
  30.  
  31. &:hover,
  32. &:focus {
  33. background-color: ${lighten(0.05, '#7D7D7D')};
  34. box-shadow: 0 8px 8px 0 ${rgba(‘#646464’, 0.4)};
  35. }
  36.  
  37. ${applyStyleModifiers(modifierConfig)}
  38. `;
Add Comment
Please, Sign In to add comment