Skip to content

Commit

Permalink
devonfw-forge#41: Implemented checkmark for closed/finished tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
dkars2s committed Dec 21, 2022
1 parent a185275 commit fa07e74
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import React from "react";
import { FunctionComponent } from "react";
interface CheckboxPoperties {
size: string;
backgroundColor: string;
accentColor: string;
}
export const Checkbox: FunctionComponent<CheckboxPoperties> = ({
size,
backgroundColor,
accentColor,
}) => {
const style = { width: size, height: size };
return (
<svg
className="checkmark"
xmlns="http://www.w3.org/2000/svg"
style={style}
viewBox="0 0 52 52"
>
<circle
className="checkmark__circle"
cx="26"
cy="26"
r="25"
fill={backgroundColor}
/>
<path
className="checkmark__check"
d="M14.1 27.2l7.1 7.2 16.7-16.8"
stroke={accentColor}
fill="none"
strokeWidth="6"
/>
</svg>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
} from "../../../../../Types/Status";
import { useTaskStore } from "../Stores/TaskStore";
import { baseUrl, serviceUrl } from "../../../../../Constants/url";
import { Checkbox } from "./Checkmark";


export const TaskCard: FunctionComponent<{
Expand Down Expand Up @@ -45,6 +46,19 @@ export const TaskCard: FunctionComponent<{
}
}

const renderCheckmark = () => {

return (
<Checkbox
key = {"checkbox"}
size = {"25px"}
backgroundColor = {"#0DA65A"}
accentColor = {" #FFFFFF"}
/>
)

}

const renderAdministrativeView = () => {
return (
<>
Expand Down Expand Up @@ -102,7 +116,7 @@ export const TaskCard: FunctionComponent<{
};

const colorStyle = {
color: '#2ADF6C',
color: '#253EEA',
fontWeight: 'bold',
};

Expand All @@ -117,9 +131,13 @@ export const TaskCard: FunctionComponent<{

const renderFinalValueOnClosedTasks = () => (
<>
<div style={colorStyle}>
Rated: {finalValue}
</div>
<>
{renderCheckmark()}
</>
<div style={colorStyle}>
Rated: {finalValue}
</div>

</>
);

Expand Down

0 comments on commit fa07e74

Please sign in to comment.