Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: icons refactoring #191

Merged
merged 11 commits into from
Aug 23, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"dependencies": {
"@emotion/core": "^10.0.14",
"@emotion/styled": "^10.0.14",
"@qiwi/pijma-media": "^1.x.x",
"@types/dom-helpers": "^3.4.1",
"@types/react": "^16.8.23",
"@types/react-dom": "^16.8.4",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,44 @@
import React from 'react'
import React, {FC} from 'react'

const FilterIcon: React.FunctionComponent = () => (
<svg viewBox="0 0 24 24" focusable="false">
<path
import {Svg, Path} from '../primitive'

export interface FilterIconProps {
size?: number
color?: string
active?: boolean
}

export const FilterIcon: FC<FilterIconProps> = ({
size = 6,
color = '#000',
active = false,
}) => (
<Svg width={size} height={size} viewBox="0 0 24 24" focusable="false">
<Path
d="M4,7h8.2c0.4,1.2,1.5,2,2.8,2s2.4-0.8,2.8-2H20c0.6,0,1-0.4,1-1s-0.4-1-1-1h-2.2c-0.4-1.2-1.5-2-2.8-2s-2.4,0.8-2.8,2H4 C3.4,5,3,5.4,3,6S3.4,7,4,7z M15,5c0.6,0,1,0.4,1,1s-0.4,1-1,1s-1-0.4-1-1S14.4,5,15,5z"
fill={color}
/>
<path
<Path
d="M20,11h-8.2C11.4,9.8,10.3,9,9,9s-2.4,0.8-2.8,2H4c-0.6,0-1,0.4-1,1s0.4,1,1,1h2.2c0.4,1.2,1.5,2,2.8,2s2.4-0.8,2.8-2H20 c0.6,0,1-0.4,1-1S20.6,11,20,11z M9,13c-0.6,0-1-0.4-1-1s0.4-1,1-1s1,0.4,1,1S9.6,13,9,13z"
fill={color}
/>
<path
<Path
d="M20,17h-1.2c-0.4-1.2-1.5-2-2.8-2s-2.4,0.8-2.8,2H4c-0.6,0-1,0.4-1,1s0.4,1,1,1h9.2c0.4,1.2,1.5,2,2.8,2s2.4-0.8,2.8-2H20 c0.6,0,1-0.4,1-1S20.6,17,20,17z M16,19c-0.6,0-1-0.4-1-1s0.4-1,1-1s1,0.4,1,1S16.6,19,16,19z"
fill={color}
/>
</svg>
{active ? (
<Path
d="M18,3a3,3 0 1,0 6,0a3,3 0 1,0 -6,0"
fill="#D0021B"
/>
) : (
null
)}
</Svg>
)

export default FilterIcon
FilterIcon.defaultProps = {
size: 6,
color: '#000',
active: false,
}
Loading