Repository URL to install this package:
|
Version:
0.14.1 ▾
|
import React from 'react'
import { DefaultProps } from 'icons/typings'
import Vector from 'atoms/Vector'
import { fromPropsToIdentifier } from 'atoms/Icons/deps'
const wording = {
description: 'CommunityIcon is a group',
title: 'Community Icon',
vectorClassName: 'communityIcon',
}
function fromBreedToComponent(breed: string) {
switch (breed) {
case 'communityIconV1':
return {
svgPath: (
<g>
<path fill={'none'} d={'M0 0h24v24H0z'} />
<path d={'M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z'} />
</g>
),
viewBox: '0 0 24 24',
}
default:
return {
svgPath: (
<React.Fragment>
<g>
<path
fillRule={'evenodd'}
d={'M15.5 8.84c-1.2 0-3.07.34-4.5 1-1.43-.67-3.3-1-4.5-1-2.17 0-6.5 1.08-6.5 3.25v2.75h22v-2.75c0-2.17-4.33-3.25-6.5-3.25zm-4 4.5h-10v-1.25c0-.54 2.56-1.75 5-1.75s5 1.21 5 1.75v1.25zm9 0H13v-1.25c0-.46-.2-.86-.52-1.22.88-.3 1.96-.53 3.02-.53 2.44 0 5 1.21 5 1.75v1.25zm-14-5.5a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7zm0-5.5a2 2 0 0 1 2 2 2 2 0 0 1-2 2 2 2 0 0 1-2-2c0-1.1.9-2 2-2zm9 5.5a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7zm0-5.5a2 2 0 0 1 2 2 2 2 0 0 1-2 2 2 2 0 0 1-2-2c0-1.1.9-2 2-2z'}
/>
</g>
</React.Fragment>
),
viewBox: '0 0 22 15',
}
}
}
class CommunityIcon extends React.PureComponent<DefaultProps> {
static defaultProps = {
width: '44px',
height: '30px',
}
render() {
const { breed } = this.props
const { svgPath, viewBox } = fromBreedToComponent(breed)
const identifier = fromPropsToIdentifier(wording)
return (
<Vector
{...this.props}
{...wording}
viewBox={viewBox}
namespace={identifier}
>
{svgPath}
</Vector>
)
}
}
export { CommunityIcon }
export default CommunityIcon