/* eslint-disable react/destructuring-assignment */ /* eslint-disable no-nested-ternary */ import React from 'react'; import clsx from 'clsx'; import { makeStyles } from '@material-ui/core/styles'; import { StepIconProps } from '@material-ui/core/StepIcon'; import { Icon } from '@blueprintjs/core'; export interface StepIconPropsDeskreen extends StepIconProps { isEntireScreenSelected: boolean; isApplicationWindowSelected: boolean; } const useColorlibStepIconStyles = makeStyles({ root: { backgroundColor: '#BFCCD6', zIndex: 1, color: '#5C7080', width: 65, height: 65, display: 'flex', borderRadius: '50%', justifyContent: 'center', alignItems: 'center', }, active: { backgroundImage: 'linear-gradient( 136deg, #FFB366 0%, #F29D49 50%, #A66321 100%)', boxShadow: '0 4px 10px 0 rgba(0,0,0,.25)', }, completed: { backgroundImage: 'linear-gradient( 136deg, #3DCC91 0%, #15B371 50%, #0E5A8A 100%)', }, stepContent: {}, }); export default function ColorlibStepIcon(props: StepIconPropsDeskreen) { const classes = useColorlibStepIconStyles(); const { active, completed, isEntireScreenSelected } = props; const color = active || completed ? '#fff' : '#5C7080'; const icons: { [index: string]: React.ReactElement } = { 1: completed ? ( ) : ( ), 2: completed ? ( isEntireScreenSelected ? ( ) : ( ) ) : ( ), 3: completed ? ( ) : ( ), }; return (
{icons[String(props.icon)]}
); }