Repository URL to install this package:
|
Version:
4.0.59 ▾
|
import React from 'react'
import { fromPropsToIdentifier } from 'atoms/Icons/deps'
import { DefaultProps } from '../../typings'
import Vector from '../../../Vector'
// extending interface from Label component
interface Props extends DefaultProps {}
const wording = {
title: 'Facebook Icon',
description: 'f icon representing facebook',
}
function fromBreedToComponent(breed: string) {
switch (breed) {
case 'withBg':
return {
svgPath: (
<path d="M0 0v455.73h242.704V279.691h-59.33v-71.864h59.33v-60.353c0-43.893 35.582-79.475 79.475-79.475h62.025v64.622h-44.382c-13.947 0-25.254 11.307-25.254 25.254v49.953h68.521l-9.47 71.864h-59.051V455.73H455.73V0H0z" />
),
viewBox: '0 0 455.73 455.73',
}
default:
return {
svgPath: (
<path d="M72.089,0.02L59.624,0C45.62,0,36.57,9.285,36.57,23.656v10.907H24.037c-1.083,0-1.96,0.878-1.96,1.961v15.803 c0,1.083,0.878,1.96,1.96,1.96h12.533v39.876c0,1.083,0.877,1.96,1.96,1.96h16.352c1.083,0,1.96-0.878,1.96-1.96V54.287h14.654 c1.083,0,1.96-0.877,1.96-1.96l0.006-15.803c0-0.52-0.207-1.018-0.574-1.386c-0.367-0.368-0.867-0.575-1.387-0.575H56.842v-9.246 c0-4.444,1.059-6.7,6.848-6.7l8.397-0.003c1.082,0,1.959-0.878,1.959-1.96V1.98C74.046,0.899,73.17,0.022,72.089,0.02z" />
),
viewBox: '0 0 90 90',
}
}
}
class FacebookIcon extends React.PureComponent<Props> {
static defaultProps = {
width: '90px',
height: '90px',
viewBox: '',
}
render() {
const { breed } = this.props
const { svgPath, viewBox } = fromBreedToComponent(breed)
const identifier = fromPropsToIdentifier(this.props)
return (
<Vector
{...this.props}
{...wording}
vectorClassName={'facebookicon'}
viewBox={viewBox}
namespace={identifier}
>
{svgPath}
</Vector>
)
}
}
export { FacebookIcon }
export default FacebookIcon