meriadec
7 years ago
5 changed files with 40 additions and 13 deletions
@ -0,0 +1,16 @@ |
|||||
|
// @flow
|
||||
|
|
||||
|
import React from 'react' |
||||
|
import styled from 'styled-components' |
||||
|
import { fontSize, color } from 'styled-system' |
||||
|
|
||||
|
const Container = styled.div` |
||||
|
${fontSize}; |
||||
|
${color}; |
||||
|
` |
||||
|
|
||||
|
export default ({ name, ...props }: { name: string }) => ( |
||||
|
<Container {...props}> |
||||
|
<i className={`fa fa-${name}`} /> |
||||
|
</Container> |
||||
|
) |
@ -0,0 +1,8 @@ |
|||||
|
const list = ['https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css'] |
||||
|
|
||||
|
list.forEach(href => { |
||||
|
const tag = document.createElement('link') |
||||
|
tag.setAttribute('rel', 'stylesheet') |
||||
|
tag.setAttribute('href', href) |
||||
|
document.head.appendChild(tag) |
||||
|
}) |
Loading…
Reference in new issue