Skip to content

Commit 55a182e

Browse files
shahzadazizmergify[bot]
authored andcommitted
feat(icons): add collections star filled icon (#1547)
* feat(icons): add collections star filled icon * feat(icons): fix snapshot * fix: default icon color * fix: update snapshots
1 parent f9705a2 commit 55a182e

File tree

4 files changed

+71
-2
lines changed

4 files changed

+71
-2
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// @flow
2+
import * as React from 'react';
3+
import classNames from 'classnames';
4+
5+
import AccessibleSVG from '../accessible-svg';
6+
import { bdlGray } from '../../styles/variables';
7+
8+
type Props = {
9+
className?: string,
10+
color?: string,
11+
height?: number,
12+
/** A text-only string describing the icon if it's not purely decorative for accessibility */
13+
title?: string | React.Element<any>,
14+
width?: number,
15+
};
16+
17+
const IconCollectionsStarFilled = ({ className = '', color = bdlGray, height = 32, title, width = 32 }: Props) => (
18+
<AccessibleSVG
19+
className={classNames('bdl-IconCollectionsStarFilled', className)}
20+
height={height}
21+
title={title}
22+
viewBox="0 0 32 32"
23+
width={width}
24+
>
25+
<path
26+
className="fill-color"
27+
d="M7.462 0h21.642a2.462 2.462 0 0 1 2.462 2.462v21.642a2.462 2.462 0 0 1-2.462 2.462H7.462A2.462 2.462 0 0 1 5 24.104V2.462A2.462 2.462 0 0 1 7.462 0zm7.265 20.558l3.558-1.944 3.558 1.944c.691.378 1.486-.258 1.35-1.081l-.672-4.07 2.852-2.888c.575-.583.268-1.625-.513-1.743l-3.97-.6-1.769-3.724c-.349-.736-1.323-.736-1.672 0l-1.77 3.725-3.969.6c-.781.117-1.088 1.159-.513 1.742l2.852 2.888-.672 4.07c-.136.823.659 1.46 1.35 1.081zM1.51 13.283c.834 0 1.51.676 1.51 1.51V26.52A2.462 2.462 0 0 0 5.48 28.98h11.728a1.51 1.51 0 0 1 0 3.019H4.923A4.923 4.923 0 0 1 0 27.077V14.792c0-.833.676-1.509 1.51-1.509z"
28+
fill={color}
29+
fillRule="evenodd"
30+
/>
31+
</AccessibleSVG>
32+
);
33+
34+
export default IconCollectionsStarFilled;

src/icons/collections/README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const IconCollections = require('./IconCollections').default;
66
const IconCollectionsFilled = require('./IconCollectionsFilled').default;
77
const IconCollectionsAdd = require('./IconCollectionsAdd').default;
88
const IconCollectionsStar = require('./IconCollectionsStar').default;
9+
const IconCollectionsStarFilled = require('./IconCollectionsStarFilled').default;
910
const IconCollectionsBolt = require('./IconCollectionsBolt').default;
1011

1112
const icons = [
@@ -21,11 +22,15 @@ const icons = [
2122
name: 'IconCollectionsAdd',
2223
component: IconCollectionsAdd,
2324
},
24-
{
25+
{
2526
name: 'IconCollectionsStar',
2627
component: IconCollectionsStar,
2728
},
28-
{
29+
{
30+
name: 'IconCollectionsStarFilled',
31+
component: IconCollectionsStarFilled,
32+
},
33+
{
2934
name: 'IconCollectionsBolt',
3035
component: IconCollectionsBolt,
3136
},
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import React from 'react';
2+
3+
import IconCollectionsStarFilled from '../IconCollectionsStarFilled';
4+
5+
describe('icons/collections/IconCollectionsStarFilled', () => {
6+
const getWrapper = (props = {}) => shallow(<IconCollectionsStarFilled {...props} />);
7+
8+
test('should correctly render default icon', () => {
9+
const wrapper = getWrapper();
10+
11+
expect(wrapper).toMatchSnapshot();
12+
});
13+
});
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`icons/collections/IconCollectionsStarFilled should correctly render default icon 1`] = `
4+
<AccessibleSVG
5+
className="bdl-IconCollectionsStarFilled"
6+
height={32}
7+
viewBox="0 0 32 32"
8+
width={32}
9+
>
10+
<path
11+
className="fill-color"
12+
d="M7.462 0h21.642a2.462 2.462 0 0 1 2.462 2.462v21.642a2.462 2.462 0 0 1-2.462 2.462H7.462A2.462 2.462 0 0 1 5 24.104V2.462A2.462 2.462 0 0 1 7.462 0zm7.265 20.558l3.558-1.944 3.558 1.944c.691.378 1.486-.258 1.35-1.081l-.672-4.07 2.852-2.888c.575-.583.268-1.625-.513-1.743l-3.97-.6-1.769-3.724c-.349-.736-1.323-.736-1.672 0l-1.77 3.725-3.969.6c-.781.117-1.088 1.159-.513 1.742l2.852 2.888-.672 4.07c-.136.823.659 1.46 1.35 1.081zM1.51 13.283c.834 0 1.51.676 1.51 1.51V26.52A2.462 2.462 0 0 0 5.48 28.98h11.728a1.51 1.51 0 0 1 0 3.019H4.923A4.923 4.923 0 0 1 0 27.077V14.792c0-.833.676-1.509 1.51-1.509z"
13+
fill="#222"
14+
fillRule="evenodd"
15+
/>
16+
</AccessibleSVG>
17+
`;

0 commit comments

Comments
 (0)