Skip to content
Merged
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
85 changes: 85 additions & 0 deletions src/components/icons/VersionManagerIcon.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
import * as React from 'react'
import styles from './Icons.module.css'
import { SMALL, MEDIUM, LARGE, MAIN_DARK_BLUE } from '../constants'

const VersionManagerIcon = ({
color = MAIN_DARK_BLUE,
size = MEDIUM,
disabled = false,
inactive = false
}) => {
let className = `${styles.svgClassName} ` + styles[`${color}`]
if (disabled) {
className += ` ${styles.iconDisabled}`
}
if (inactive) {
className += ` ${styles.iconInactive}`
}
let icon = <></>

switch (size) {
case SMALL:
icon = (
<svg
width={16}
height={16}
viewBox='0 0 16 16'
fill='none'
xmlns='http://www.w3.org/2000/svg'
className={className}
>
<path d='M5.00016 9.16437C5.6275 9.16437 6.13606 8.66434 6.13606 8.04752C6.13606 7.4307 5.6275 6.93066 5.00016 6.93066C4.37282 6.93066 3.86426 7.4307 3.86426 8.04752C3.86426 8.66434 4.37282 9.16437 5.00016 9.16437Z' stroke='none' strokeLinecap='round' strokeLinejoin='round' />
<path d='M5.60978 5.17401V5.55305C5.60978 5.62518 5.65548 5.69036 5.72434 5.71567L6.21603 5.89854C6.28296 5.92322 6.3589 5.90614 6.40781 5.85425L6.644 5.60494C6.7135 5.53153 6.83192 5.5309 6.90207 5.6043L7.47227 6.19785C7.53599 6.26429 7.53663 6.36743 7.4742 6.43451L7.17044 6.76229C7.12217 6.81417 7.11059 6.88947 7.14083 6.95275L7.34678 7.38937C7.37574 7.45075 7.43881 7.49061 7.50767 7.49061H7.82302C7.92084 7.49061 8 7.56845 8 7.66463V8.39738C8 8.49357 7.92084 8.5714 7.82302 8.5714H7.49158C7.415 8.5714 7.34678 8.62012 7.32296 8.69163L7.15564 9.19595C7.13569 9.25543 7.14984 9.32061 7.19296 9.3668L7.46519 9.66231C7.53148 9.73444 7.52505 9.84645 7.45039 9.91036L6.82291 10.4501C6.75083 10.5121 6.64142 10.5064 6.57642 10.4375L6.35761 10.2059C6.30999 10.1552 6.23598 10.1369 6.16969 10.1597L5.71275 10.3166C5.64132 10.3413 5.59369 10.4071 5.59369 10.4811V10.826C5.59369 10.9222 5.51453 11 5.41671 11H4.58264C4.48482 11 4.40566 10.9222 4.40566 10.826V10.4811C4.40566 10.4071 4.35804 10.3413 4.2866 10.3166L3.82967 10.1597C3.76338 10.1369 3.68937 10.1546 3.64175 10.2059L3.42293 10.4375C3.35793 10.5064 3.24853 10.5121 3.17645 10.4501L2.54896 9.91036C2.47431 9.84645 2.46788 9.73444 2.53416 9.66231L2.80639 9.3668C2.84887 9.32061 2.86303 9.25543 2.84372 9.19595L2.67639 8.69163C2.65258 8.62012 2.58436 8.5714 2.50778 8.5714H2.17698C2.07916 8.5714 2 8.49357 2 8.39738V7.66463C2 7.56845 2.07916 7.49061 2.17698 7.49061H2.49233C2.56119 7.49061 2.62426 7.45138 2.65322 7.38937L2.85917 6.95275C2.88941 6.88884 2.87719 6.81417 2.82956 6.76229L2.5258 6.43451C2.46337 6.36743 2.46401 6.26366 2.52773 6.19785L3.09793 5.6043C3.16808 5.53153 3.2865 5.53153 3.356 5.60494L3.59219 5.85425C3.6411 5.90614 3.71704 5.92322 3.78398 5.89854L4.27566 5.71567C4.34452 5.69036 4.39022 5.62518 4.39022 5.55305V5.17401C4.39022 5.07783 4.46938 5 4.5672 5H5.4328C5.53062 5 5.60978 5.07783 5.60978 5.17401Z' stroke='none' strokeLinecap='round' strokeLinejoin='round' />
<path d='M13.1359 4.23371C13.7632 4.23371 14.2718 3.73367 14.2718 3.11685C14.2718 2.50003 13.7632 2 13.1359 2C12.5086 2 12 2.50003 12 3.11685C12 3.73367 12.5086 4.23371 13.1359 4.23371Z' stroke='none' strokeLinecap='round' strokeLinejoin='round' />
<path d='M13.1359 9.23371C13.7632 9.23371 14.2718 8.73367 14.2718 8.11685C14.2718 7.50003 13.7632 7 13.1359 7C12.5086 7 12 7.50003 12 8.11685C12 8.73367 12.5086 9.23371 13.1359 9.23371Z' stroke='none' strokeLinecap='round' strokeLinejoin='round' />
<path d='M13.1359 14.2337C13.7632 14.2337 14.2718 13.7337 14.2718 13.1169C14.2718 12.5 13.7632 12 13.1359 12C12.5086 12 12 12.5 12 13.1169C12 13.7337 12.5086 14.2337 13.1359 14.2337Z' stroke='none' strokeLinecap='round' strokeLinejoin='round' />
<path d='M8 8H10M10 8V5V4C10 3.44772 10.4477 3 11 3H12M10 8V11V12C10 12.5523 10.4477 13 11 13H12M10 8H12' stroke='none' strokeLinecap='round' strokeLinejoin='round' />
</svg>
)
break
case MEDIUM:
icon = (
<svg
width={24}
height={24}
viewBox='0 0 24 24'
fill='none'
xmlns='http://www.w3.org/2000/svg'
className={className}
>
<path d='M7.5006 13.7466C8.44161 13.7466 9.20445 12.9965 9.20445 12.0713C9.20445 11.146 8.44161 10.396 7.5006 10.396C6.55959 10.396 5.79675 11.146 5.79675 12.0713C5.79675 12.9965 6.55959 13.7466 7.5006 13.7466Z' stroke='none' strokeWidth={1.5} strokeLinecap='round' strokeLinejoin='round' />
<path d='M8.41467 7.76102V8.32957C8.41467 8.43778 8.48321 8.53554 8.58651 8.57351L9.32404 8.84782C9.42443 8.88483 9.53835 8.85921 9.61171 8.78138L9.966 8.4074C10.0703 8.2973 10.2479 8.29635 10.3531 8.40645L11.2084 9.29677C11.304 9.39644 11.3049 9.55115 11.2113 9.65176L10.7557 10.1434C10.6833 10.2213 10.6659 10.3342 10.7113 10.4291L11.0202 11.0841C11.0636 11.1761 11.1582 11.2359 11.2615 11.2359H11.7345C11.8813 11.2359 12 11.3527 12 11.4969V12.5961C12 12.7404 11.8813 12.8571 11.7345 12.8571H11.2374C11.1225 12.8571 11.0202 12.9302 10.9844 13.0374L10.7335 13.7939C10.7035 13.8831 10.7248 13.9809 10.7894 14.0502L11.1978 14.4935C11.2972 14.6017 11.2876 14.7697 11.1756 14.8655L10.2344 15.6752C10.1262 15.7682 9.96214 15.7597 9.86464 15.6562L9.53641 15.3088C9.46498 15.2329 9.35396 15.2053 9.25453 15.2395L8.56913 15.4749C8.46198 15.5119 8.39054 15.6106 8.39054 15.7217V16.239C8.39054 16.3833 8.2718 16.5 8.12507 16.5H6.87397C6.72723 16.5 6.60849 16.3833 6.60849 16.239V15.7217C6.60849 15.6106 6.53706 15.5119 6.4299 15.4749L5.7445 15.2395C5.64507 15.2053 5.53406 15.2319 5.46262 15.3088L5.1344 15.6562C5.0369 15.7597 4.87279 15.7682 4.76467 15.6752L3.82345 14.8655C3.71147 14.7697 3.70181 14.6017 3.80124 14.4935L4.20959 14.0502C4.2733 13.9809 4.29454 13.8831 4.26558 13.7939L4.01459 13.0374C3.97887 12.9302 3.87654 12.8571 3.76166 12.8571H3.26547C3.11874 12.8571 3 12.7404 3 12.5961V11.4969C3 11.3527 3.11874 11.2359 3.26547 11.2359H3.7385C3.84179 11.2359 3.93639 11.1771 3.97983 11.0841L4.28875 10.4291C4.33412 10.3333 4.31578 10.2213 4.24434 10.1434L3.78869 9.65176C3.69506 9.55115 3.69602 9.39549 3.79159 9.29677L4.64689 8.40645C4.75212 8.2973 4.92974 8.2973 5.034 8.4074L5.38829 8.78138C5.46165 8.85921 5.57557 8.88483 5.67596 8.84782L6.41349 8.57351C6.51679 8.53554 6.58533 8.43778 6.58533 8.32957V7.76102C6.58533 7.61675 6.70406 7.5 6.8508 7.5H8.1492C8.29593 7.5 8.41467 7.61675 8.41467 7.76102Z' stroke='none' strokeWidth={1.5} strokeLinecap='round' strokeLinejoin='round' />
<path d='M19.7039 6.35056C20.6449 6.35056 21.4077 5.60051 21.4077 4.67528C21.4077 3.75005 20.6449 3 19.7039 3C18.7628 3 18 3.75005 18 4.67528C18 5.60051 18.7628 6.35056 19.7039 6.35056Z' stroke='none' strokeWidth={1.5} strokeLinecap='round' strokeLinejoin='round' />
<path d='M19.7039 13.8506C20.6449 13.8506 21.4077 13.1005 21.4077 12.1753C21.4077 11.25 20.6449 10.5 19.7039 10.5C18.7628 10.5 18 11.25 18 12.1753C18 13.1005 18.7628 13.8506 19.7039 13.8506Z' stroke='none' strokeWidth={1.5} strokeLinecap='round' strokeLinejoin='round' />
<path d='M19.7039 21.3506C20.6449 21.3506 21.4077 20.6005 21.4077 19.6753C21.4077 18.75 20.6449 18 19.7039 18C18.7628 18 18 18.75 18 19.6753C18 20.6005 18.7628 21.3506 19.7039 21.3506Z' stroke='none' strokeWidth={1.5} strokeLinecap='round' strokeLinejoin='round' />
<path d='M12 12H15M15 12V7.5V5.5C15 4.94772 15.4477 4.5 16 4.5H18M15 12V16.5V18.5C15 19.0523 15.4477 19.5 16 19.5H18M15 12H18' stroke='none' strokeWidth={1.5} strokeLinecap='round' strokeLinejoin='round' />
</svg>
)
break
case LARGE:
icon = (
<svg
width={40}
height={40}
viewBox='0 0 40 40'
fill='none'
xmlns='http://www.w3.org/2000/svg'
className={className}
>
<path d='M12.501 22.9107C14.0694 22.9107 15.3408 21.6606 15.3408 20.1185C15.3408 18.5765 14.0694 17.3264 12.501 17.3264C10.9327 17.3264 9.66125 18.5765 9.66125 20.1185C9.66125 21.6606 10.9327 22.9107 12.501 22.9107Z' stroke='none' strokeWidth={2} strokeLinecap='round' strokeLinejoin='round' />
<path d='M14.0245 12.935V13.8826C14.0245 14.063 14.1387 14.2259 14.3108 14.2892L15.5401 14.7464C15.7074 14.8081 15.8972 14.7653 16.0195 14.6356L16.61 14.0123C16.7838 13.8288 17.0798 13.8273 17.2552 14.0108L18.6807 15.4946C18.84 15.6607 18.8416 15.9186 18.6855 16.0863L17.9261 16.9057C17.8054 17.0354 17.7765 17.2237 17.8521 17.3819L18.3669 18.4734C18.4393 18.6269 18.597 18.7265 18.7692 18.7265H19.5575C19.8021 18.7265 20 18.9211 20 19.1616V20.9935C20 21.2339 19.8021 21.4285 19.5575 21.4285H18.7289C18.5375 21.4285 18.3669 21.5503 18.3074 21.7291L17.8891 22.9899C17.8392 23.1386 17.8746 23.3015 17.9824 23.417L18.663 24.1558C18.8287 24.3361 18.8126 24.6161 18.626 24.7759L17.0573 26.1253C16.8771 26.2803 16.6036 26.2661 16.4411 26.0937L15.894 25.5147C15.775 25.3881 15.5899 25.3422 15.4242 25.3992L14.2819 25.7915C14.1033 25.8532 13.9842 26.0177 13.9842 26.2028V27.065C13.9842 27.3054 13.7863 27.5 13.5418 27.5H11.4566C11.2121 27.5 11.0142 27.3054 11.0142 27.065V26.2028C11.0142 26.0177 10.8951 25.8532 10.7165 25.7915L9.57417 25.3992C9.40845 25.3422 9.22343 25.3865 9.10437 25.5147L8.55733 26.0937C8.39483 26.2661 8.12131 26.2803 7.94111 26.1253L6.37241 24.7759C6.18578 24.6161 6.16969 24.3361 6.33541 24.1558L7.01598 23.417C7.12217 23.3015 7.15757 23.1386 7.1093 22.9899L6.69098 21.7291C6.63145 21.5503 6.4609 21.4285 6.26944 21.4285H5.44245C5.1979 21.4285 5 21.2339 5 20.9935V19.1616C5 18.9211 5.1979 18.7265 5.44245 18.7265H6.23083C6.40298 18.7265 6.56066 18.6285 6.63306 18.4734L7.14791 17.3819C7.22353 17.2221 7.19296 17.0354 7.0739 16.9057L6.31449 16.0863C6.15843 15.9186 6.16003 15.6591 6.31932 15.4946L7.74482 14.0108C7.9202 13.8288 8.21624 13.8288 8.39 14.0123L8.98048 14.6356C9.10276 14.7653 9.29261 14.8081 9.45994 14.7464L10.6892 14.2892C10.8613 14.2259 10.9755 14.063 10.9755 13.8826V12.935C10.9755 12.6946 11.1734 12.5 11.418 12.5H13.582C13.8266 12.5 14.0245 12.6946 14.0245 12.935Z' stroke='none' strokeWidth={2} strokeLinecap='round' strokeLinejoin='round' />
<path d='M32.8398 10.5843C34.4081 10.5843 35.6795 9.33418 35.6795 7.79213C35.6795 6.25008 34.4081 5 32.8398 5C31.2714 5 30 6.25008 30 7.79213C30 9.33418 31.2714 10.5843 32.8398 10.5843Z' stroke='none' strokeWidth={2} strokeLinecap='round' strokeLinejoin='round' />
<path d='M32.8398 23.0843C34.4081 23.0843 35.6795 21.8342 35.6795 20.2921C35.6795 18.7501 34.4081 17.5 32.8398 17.5C31.2714 17.5 30 18.7501 30 20.2921C30 21.8342 31.2714 23.0843 32.8398 23.0843Z' stroke='none' strokeWidth={2} strokeLinecap='round' strokeLinejoin='round' />
<path d='M32.8398 35.5843C34.4081 35.5843 35.6795 34.3342 35.6795 32.7921C35.6795 31.2501 34.4081 30 32.8398 30C31.2714 30 30 31.2501 30 32.7921C30 34.3342 31.2714 35.5843 32.8398 35.5843Z' stroke='none' strokeWidth={2} strokeLinecap='round' strokeLinejoin='round' />
<path d='M20 20H25M25 20V12.5V8.5C25 7.94772 25.4477 7.5 26 7.5H30M25 20V27.5V31.5C25 32.0523 25.4477 32.5 26 32.5H30M25 20H30' stroke='none' strokeWidth={2} strokeLinecap='round' strokeLinejoin='round' />
</svg>
)
break

default:
break
}
return icon
}

export default VersionManagerIcon
2 changes: 2 additions & 0 deletions src/components/icons/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ import UserComputerIcon from './UserComputerIcon'
import UserIcon from './UserIcon'
import UserRemoveIcon from './UserRemoveIcon'
import UserRoleIcon from './UserRoleIcon'
import VersionManagerIcon from './VersionManagerIcon'
import WorkflowIcon from './WorkflowIcon'
import WorkspaceDynamicIcon from './WorkspaceDynamicIcon'
import WorkspaceEmptyIcon from './WorkspaceEmptyIcon'
Expand Down Expand Up @@ -466,6 +467,7 @@ export default {
UserIcon,
UserRemoveIcon,
UserRoleIcon,
VersionManagerIcon,
WorkflowIcon,
WorkspaceDynamicIcon,
WorkspaceEmptyIcon,
Expand Down
Loading