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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
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}
strokeMiterlimit="10"
strokeWidth="2"
strokeLinejoin="round"
Expand All @@ -29,4 +25,4 @@ const CancelIcon: React.FC = () => {
);
};

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

Check warning on line 1 in frontend/src/components/common/Icons/CheckmarkIcon.tsx

View workflow job for this annotation

GitHub Actions / build / build-and-test

Replace `"react"` with `'react'`
import styled from "styled-components";

Check warning on line 2 in frontend/src/components/common/Icons/CheckmarkIcon.tsx

View workflow job for this annotation

GitHub Actions / build / build-and-test

Replace `"styled-components"` with `'styled-components'`

const CheckmarkIcon: FC = () => {

Check warning on line 4 in frontend/src/components/common/Icons/CheckmarkIcon.tsx

View workflow job for this annotation

GitHub Actions / build / build-and-test

Delete `⏎`

return (
<svg
xmlns="http://www.w3.org/2000/svg"
Expand All @@ -13,18 +15,11 @@
>
<title>Checkmark</title>
<desc>A line styled icon from Orion Icon Library.</desc>
<path

Check warning on line 18 in frontend/src/components/common/Icons/CheckmarkIcon.tsx

View workflow job for this annotation

GitHub Actions / build / build-and-test

Replace `⏎········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"⏎·····` with `·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"`
data-name="layer1"
fill="none"
stroke="#FFFFFF"
strokeMiterlimit="10"
strokeWidth="2"
d="M2 30l21 22 39-40"
strokeLinejoin="round"
strokeLinecap="round"
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"
/>
</svg>
);
};

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