Advertisement
Guest User

Untitled

a guest
May 27th, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. import React from 'react';
  2. const {PropTypes} = React;
  3.  
  4. const icons = {
  5. trash: 'M192 1024h640l64-704h-768zM640 128v-128h-256v128h-320v192l64-64h768l64 64v-192h-320zM576 128h-128v-64h128v64z',
  6. facebook: 'M608 192h160v-192h-160c-123.514 0-224 100.486-224 224v96h-128v192h128v512h192v-512h160l32-192h-192v-96c0-17.346 14.654-32 32-32z',
  7. };
  8.  
  9. const Icon = props => (
  10. <svg width="22" height="22" viewBox="0 0 1024 1024">
  11. <path d={icons[props.icon]}></path>
  12. </svg>
  13. );
  14.  
  15. Icon.propTypes = {
  16. icon: PropTypes.string.isRequired,
  17. };
  18.  
  19. export default Icon;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement