Advertisement
Guest User

Untitled

a guest
Aug 20th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. export default ({
  2. ...props,
  3. type,
  4. action,
  5. top,
  6. small,
  7. overlay
  8. }) =>
  9. <IconButton
  10. onClick={() => action()}
  11. bg="transparent"
  12. px={3}
  13. mt={top && 2}
  14. small={small}
  15. overlay={overlay}>
  16. {Icons[type]()}
  17. </IconButton>;
  18.  
  19. const IconButton = styled(Button)`
  20. background: ${({ overlay }) => (overlay ? "white" : "transparent")};
  21. svg {
  22. height: ${props =>
  23. props.small ? props.theme.fontSizes[4] : props.theme.fontSizes[5]}px;
  24. width: ${props => props.theme.fontSizes[5]}px;
  25. }
  26. `;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement