Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 918a93f

Browse files
authored
feature: Add bookmark icons (#191)
* Add bookmark icons * Storyshots * bump version
1 parent c678149 commit 918a93f

File tree

24 files changed

+419
-270
lines changed

24 files changed

+419
-270
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@gnosis.pm/safe-react-components",
3-
"version": "1.0.2",
3+
"version": "1.1.0",
44
"description": "Gnosis UI components",
55
"main": "dist/index.min.js",
66
"typings": "dist/index.d.ts",

src/dataDisplay/Icon/icon.stories.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ export const Icons = (): React.ReactElement => {
4545
'arrowLeft',
4646
'assets',
4747
'awaitingConfirmations',
48+
'bookmark',
49+
'bookmarkFilled',
4850
'camera',
4951
'chain',
5052
'check',
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import React from 'react';
2+
3+
export default {
4+
sm: (
5+
<svg
6+
height="16"
7+
width="12"
8+
viewBox="0 0 12 12"
9+
fill="none"
10+
xmlns="http://www.w3.org/2000/svg">
11+
<g fill="none" fillRule="evenodd">
12+
<path
13+
className="icon-stroke"
14+
d="M9 11L5 8.22222L1 11V2.11111C1 1.81643 1.12041 1.53381 1.33474 1.32544C1.54906 1.11706 1.83975 1 2.14286 1H7.85714C8.16025 1 8.45094 1.11706 8.66527 1.32544C8.87959 1.53381 9 1.81643 9 2.11111V11Z"
15+
strokeWidth="1"
16+
strokeLinecap="round"
17+
strokeLinejoin="round"
18+
/>
19+
</g>
20+
</svg>
21+
),
22+
md: (
23+
<svg
24+
height="24"
25+
width="20"
26+
viewBox="0 0 12 12"
27+
fill="none"
28+
xmlns="http://www.w3.org/2000/svg">
29+
<g fill="none" fillRule="evenodd">
30+
<path
31+
className="icon-stroke"
32+
d="M9 11L5 8.22222L1 11V2.11111C1 1.81643 1.12041 1.53381 1.33474 1.32544C1.54906 1.11706 1.83975 1 2.14286 1H7.85714C8.16025 1 8.45094 1.11706 8.66527 1.32544C8.87959 1.53381 9 1.81643 9 2.11111V11Z"
33+
strokeWidth="1"
34+
strokeLinecap="round"
35+
strokeLinejoin="round"
36+
/>
37+
</g>
38+
</svg>
39+
),
40+
};
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import React from 'react';
2+
3+
export default {
4+
sm: (
5+
<svg
6+
height="16"
7+
width="12"
8+
viewBox="0 0 12 12"
9+
fill="none"
10+
xmlns="http://www.w3.org/2000/svg">
11+
<g fill="none" fillRule="evenodd">
12+
<path
13+
className="icon-color icon-stroke"
14+
d="M9 11L5 8.22222L1 11V2.11111C1 1.81643 1.12041 1.53381 1.33474 1.32544C1.54906 1.11706 1.83975 1 2.14286 1H7.85714C8.16025 1 8.45094 1.11706 8.66527 1.32544C8.87959 1.53381 9 1.81643 9 2.11111V11Z"
15+
strokeWidth="1"
16+
strokeLinecap="round"
17+
strokeLinejoin="round"
18+
/>
19+
</g>
20+
</svg>
21+
),
22+
md: (
23+
<svg
24+
height="24"
25+
width="20"
26+
viewBox="0 0 12 12"
27+
fill="none"
28+
xmlns="http://www.w3.org/2000/svg">
29+
<g fill="none" fillRule="evenodd">
30+
<path
31+
className="icon-color icon-stroke"
32+
d="M9 11L5 8.22222L1 11V2.11111C1 1.81643 1.12041 1.53381 1.33474 1.32544C1.54906 1.11706 1.83975 1 2.14286 1H7.85714C8.16025 1 8.45094 1.11706 8.66527 1.32544C8.87959 1.53381 9 1.81643 9 2.11111V11Z"
33+
strokeWidth="1"
34+
strokeLinecap="round"
35+
strokeLinejoin="round"
36+
/>
37+
</g>
38+
</svg>
39+
),
40+
};

src/dataDisplay/Icon/index.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ import arrowDown from './images/arrowDown';
1515
import arrowLeft from './images/arrowLeft';
1616
import assets from './images/assets';
1717
import awaitingConfirmations from './images/awaitingConfirmations';
18+
import bookmark from './images/bookmark';
19+
import bookmarkFilled from './images/bookmarkFilled';
1820
import camera from './images/camera';
1921
import chain from './images/chain';
2022
import check from './images/check';
@@ -88,6 +90,11 @@ const StyledIcon = styled.span<{ color?: ThemeColors }>`
8890
fill: ${({ theme, color }) =>
8991
color ? theme.colors[color] : theme.colors.icon};
9092
}
93+
94+
.icon-stroke {
95+
stroke: ${({ theme, color }) =>
96+
color ? theme.colors[color] : theme.colors.icon};
97+
}
9198
`;
9299

93100
const icons = {
@@ -103,6 +110,8 @@ const icons = {
103110
arrowRight,
104111
assets,
105112
awaitingConfirmations,
113+
bookmark,
114+
bookmarkFilled,
106115
camera,
107116
chain,
108117
check,

tests/dataDisplay/Accordion/__snapshots__/accordion.stories.storyshot

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ exports[`Storyshots Data Display/Accordion Compact Accordion 1`] = `
4141
className="sc-egiyK cgERpw"
4242
>
4343
<span
44-
className="sc-iqseJM iJclAE"
44+
className="sc-iqseJM drawdo"
4545
>
4646
<svg
4747
height="16"
@@ -171,7 +171,7 @@ exports[`Storyshots Data Display/Accordion Compact Accordion 1`] = `
171171
className="sc-egiyK cgERpw"
172172
>
173173
<span
174-
className="sc-iqseJM iJclAE"
174+
className="sc-iqseJM drawdo"
175175
>
176176
<svg
177177
height="16"
@@ -301,7 +301,7 @@ exports[`Storyshots Data Display/Accordion Compact Accordion 1`] = `
301301
className="sc-egiyK cgERpw"
302302
>
303303
<span
304-
className="sc-iqseJM iJclAE"
304+
className="sc-iqseJM drawdo"
305305
>
306306
<svg
307307
height="16"
@@ -438,7 +438,7 @@ exports[`Storyshots Data Display/Accordion Simple Accordion 1`] = `
438438
className="sc-egiyK cgERpw"
439439
>
440440
<span
441-
className="sc-iqseJM iJclAE"
441+
className="sc-iqseJM drawdo"
442442
>
443443
<svg
444444
height="16"
@@ -568,7 +568,7 @@ exports[`Storyshots Data Display/Accordion Simple Accordion 1`] = `
568568
className="sc-egiyK cgERpw"
569569
>
570570
<span
571-
className="sc-iqseJM iJclAE"
571+
className="sc-iqseJM drawdo"
572572
>
573573
<svg
574574
height="16"
@@ -698,7 +698,7 @@ exports[`Storyshots Data Display/Accordion Simple Accordion 1`] = `
698698
className="sc-egiyK cgERpw"
699699
>
700700
<span
701-
className="sc-iqseJM iJclAE"
701+
className="sc-iqseJM drawdo"
702702
>
703703
<svg
704704
height="16"

tests/dataDisplay/Card/__snapshots__/card.stories.storyshot

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ exports[`Storyshots Data Display/Card Card Disabled 1`] = `
4545
className="MuiButton-label"
4646
>
4747
<span
48-
className="sc-iqseJM iJclAE sc-bBHxTw jBIXxL"
48+
className="sc-iqseJM drawdo sc-bBHxTw jBIXxL"
4949
>
5050
<svg
5151
height="16"
@@ -125,7 +125,7 @@ exports[`Storyshots Data Display/Card Simple Card 1`] = `
125125
className="MuiButton-label"
126126
>
127127
<span
128-
className="sc-iqseJM iJclAE sc-bBHxTw jBIXxL"
128+
className="sc-iqseJM drawdo sc-bBHxTw jBIXxL"
129129
>
130130
<svg
131131
height="16"

tests/dataDisplay/Dot/__snapshots__/dot.stories.storyshot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ exports[`Storyshots Data Display/Dot Dot With Icon 1`] = `
66
color="rinkeby"
77
>
88
<span
9-
className="sc-iqseJM lvDyr"
9+
className="sc-iqseJM kNdvIY"
1010
color="white"
1111
>
1212
<svg

0 commit comments

Comments
 (0)