feat(dashboard-v2): make circle around checkmark icon optional
This commit is contained in:
parent
f26822900f
commit
c058270a79
|
@ -1,6 +1,8 @@
|
|||
import PropTypes from "prop-types";
|
||||
|
||||
import { withIconProps } from "../withIconProps";
|
||||
|
||||
export const CircledCheckmarkIcon = withIconProps(({ size, ...props }) => (
|
||||
export const CheckmarkIcon = withIconProps(({ size, circled, ...props }) => (
|
||||
<svg
|
||||
width={size}
|
||||
height={size}
|
||||
|
@ -9,10 +11,15 @@ export const CircledCheckmarkIcon = withIconProps(({ size, ...props }) => (
|
|||
shapeRendering="geometricPrecision"
|
||||
{...props}
|
||||
>
|
||||
<circle cx="16" cy="16" r="15" fill="transparent" stroke="currentColor" strokeWidth="2" />
|
||||
{circled && <circle cx="16" cy="16" r="15" fill="transparent" stroke="currentColor" strokeWidth="2" />}
|
||||
<polygon
|
||||
fill="currentColor"
|
||||
points="22.45 11.19 23.86 12.61 14.44 22.03 9.69 17.28 11.1 15.86 14.44 19.2 22.45 11.19"
|
||||
/>
|
||||
</svg>
|
||||
));
|
||||
|
||||
CheckmarkIcon.propTypes = {
|
||||
...CheckmarkIcon.propTypes,
|
||||
circled: PropTypes.bool,
|
||||
};
|
|
@ -4,7 +4,7 @@ export * from "./icons/LockClosedIcon";
|
|||
export * from "./icons/SkynetLogoIcon";
|
||||
export * from "./icons/ArrowRightIcon";
|
||||
export * from "./icons/InfoIcon";
|
||||
export * from "./icons/CircledCheckmarkIcon";
|
||||
export * from "./icons/CheckmarkIcon";
|
||||
export * from "./icons/CircledErrorIcon";
|
||||
export * from "./icons/CircledProgressIcon";
|
||||
export * from "./icons/CircledArrowUpIcon";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import cn from "classnames";
|
||||
|
||||
import { CircledCheckmarkIcon, CircledErrorIcon, CircledProgressIcon, CircledArrowUpIcon } from "../Icons";
|
||||
import { CheckmarkIcon, CircledErrorIcon, CircledProgressIcon, CircledArrowUpIcon } from "../Icons";
|
||||
|
||||
export default function UploaderItemIcon({ status }) {
|
||||
switch (status) {
|
||||
|
@ -11,7 +11,7 @@ export default function UploaderItemIcon({ status }) {
|
|||
case "processing":
|
||||
return <CircledProgressIcon className="animate-[spin_3s_linear_infinite]" />;
|
||||
case "complete":
|
||||
return <CircledCheckmarkIcon />;
|
||||
return <CheckmarkIcon circled />;
|
||||
case "error":
|
||||
return <CircledErrorIcon className="text-error" />;
|
||||
default:
|
||||
|
|
Reference in New Issue