Skip to content
This repository was archived by the owner on Mar 6, 2025. It is now read-only.

Commit 78e0e12

Browse files
author
ChrisTerBeke
authored
Merge pull request #231 from Ultimaker/CS-220-add-MISP-related-icons
CS-220 add new icon
2 parents afe955f + c0a63a9 commit 78e0e12

File tree

4 files changed

+35
-1
lines changed

4 files changed

+35
-1
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import * as React from 'react';
2+
import { IconWrapper, IconProps } from './icon_wrapper';
3+
4+
/** this icon works a bit differently than the rest
5+
* when it's color is modified, it's affecting the 'i' letter in the inside
6+
* the color of the surrounding disc is colored by overwriting the background attribute
7+
* of the icon--info-circular class
8+
*/
9+
const InfoCircularIcon: React.StatelessComponent<IconProps> = ({ className }): JSX.Element => (
10+
<div className={`${className} icon--info-circular`}>
11+
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 22">
12+
<path d="M12,14.5v-5a1,1,0,0,0-1-1H10a1,1,0,0,0,0,2v4a1,1,0,0,0,0,2h2a1,1,0,0,0,0-2Z" />
13+
<circle cx="11" cy="6.5" r="1" />
14+
</svg>
15+
</div>
16+
);
17+
18+
InfoCircularIcon.displayName = 'InfoCircularIcon';
19+
20+
export default IconWrapper(InfoCircularIcon);

src/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ export { default as WarningIcon } from './components/icons/warning_icon';
134134
export { default as WebsiteIcon } from './components/icons/website_icon';
135135
export { default as TeamsIcon } from './components/icons/teams_icon';
136136
export { default as TickIcon } from './components/icons/tick_icon';
137+
export { default as InfoCircularIcon } from './components/icons/info_circular_icon';
137138

138139
// views
139140
export * from './views/page_not_found';

src/stories/icons.stories.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ import MultiplyIcon from '../components/icons/multiply_icon';
4747
import MoveUpIcon from '../components/icons/move_up_icon';
4848
import TeamsIcon from '../components/icons/teams_icon';
4949
import TickIcon from '../components/icons/tick_icon';
50+
import InfoCircularIcon from '../components/icons/info_circular_icon';
5051

5152
const stories = storiesOf('Icons', module);
5253

@@ -267,6 +268,11 @@ stories.add('Icons', withInfo(
267268
<TickIcon {...props} />
268269
</Tooltip>
269270
</GridItem>
271+
<GridItem layoutWidth="fit">
272+
<Tooltip tooltipText="InfoCircularIcon">
273+
<InfoCircularIcon {...props} />
274+
</Tooltip>
275+
</GridItem>
270276

271277

272278
</Grid>

src/stylesheets/_icons.scss

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
fill: $color-black;
1414
}
1515

16-
&.icon--circle {
16+
&.icon--circle,
17+
&.icon--info-circular {
1718
border-radius: 50%;
1819
height: 4rem;
1920
width: 4rem;
@@ -72,6 +73,12 @@
7273
}
7374
}
7475

76+
&.icon--info-circular {
77+
background-color: $color-grey-dark;
78+
width: 2.2rem;
79+
height: 2.2rem;
80+
}
81+
7582
&.icon--blue svg {
7683
fill: $color-blue;
7784
}

0 commit comments

Comments
 (0)