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

Issue 372 - Icon color not updating with theme color #452

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
8 changes: 2 additions & 6 deletions frontend/src/components/common/Icons/CancelIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import React from 'react';
import { useTheme } from 'styled-components';
import styled from 'styled-components';

const CancelIcon: React.FC = () => {
const theme = useTheme();
return (
<svg
xmlns="http://www.w3.org/2000/svg"
Expand All @@ -16,10 +15,7 @@ const CancelIcon: React.FC = () => {
<title>Cancel</title>
<desc>A line styled icon from Orion Icon Library.</desc>
<path
data-name="layer1"
d="M53.122 48.88L36.243 32l16.878-16.878a3 3 0 0 0-4.242-4.242L32 27.758l-16.878-16.88a3 3 0 0 0-4.243 4.243l16.878 16.88-16.88 16.88a3 3 0 0 0 4.243 4.241L32 36.243l16.878 16.88a3 3 0 0 0 4.244-4.243z"
fill="none"
stroke={theme.icons.cancelIcon}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the color should be different for two themes, how is this supposed to work after the changes you've introduced?

strokeMiterlimit="10"
strokeWidth="2"
strokeLinejoin="round"
Expand All @@ -29,4 +25,4 @@ const CancelIcon: React.FC = () => {
);
};

export default CancelIcon;
export default styled(CancelIcon)``;
14 changes: 3 additions & 11 deletions frontend/src/components/common/Icons/CheckmarkIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { FC } from 'react';
import styled from 'styled-components';

const CheckmarkIcon: FC = () => {
return (
Expand All @@ -13,18 +14,9 @@ const CheckmarkIcon: FC = () => {
>
<title>Checkmark</title>
<desc>A line styled icon from Orion Icon Library.</desc>
<path
data-name="layer1"
fill="none"
stroke="#FFFFFF"
strokeMiterlimit="10"
strokeWidth="2"
d="M2 30l21 22 39-40"
strokeLinejoin="round"
strokeLinecap="round"
/>
<path d="M25 48c-1.1 0-2.2-.4-3-1.2l-13-13c-1.6-1.6-1.6-4.2 0-5.8s4.2-1.6 5.8 0L25 38.8 49.2 14.6c1.6-1.6 4.2-1.6 5.8 0s1.6 4.2 0 5.8l-27 27c-.8.8-1.9 1.2-3 1.2z" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's happening here, why is the shape changed?

</svg>
);
};

export default CheckmarkIcon;
export default styled(CheckmarkIcon)``;
Loading