diff --git a/app/web/src/components/ImageUploader/ImageUploader.js b/app/web/src/components/ImageUploader/ImageUploader.js index b70a38f..d61f67a 100644 --- a/app/web/src/components/ImageUploader/ImageUploader.js +++ b/app/web/src/components/ImageUploader/ImageUploader.js @@ -6,7 +6,7 @@ import ReactCrop from 'react-image-crop' import { Dialog } from '@material-ui/core' import { Image as CloudinaryImage } from 'cloudinary-react' import 'react-image-crop/dist/ReactCrop.css' -import Svg from 'src/components/Svg/Svg.js' +import Svg from 'src/components/Svg' const CLOUDINARY_UPLOAD_PRESET = 'CadHub_project_images' const CLOUDINARY_UPLOAD_URL = 'https://api.cloudinary.com/v1_1/irevdev/upload' diff --git a/app/web/src/components/Svg/Svg.js b/app/web/src/components/Svg/Svg.tsx similarity index 81% rename from app/web/src/components/Svg/Svg.js rename to app/web/src/components/Svg/Svg.tsx index 90f1913..523e9a4 100644 --- a/app/web/src/components/Svg/Svg.js +++ b/app/web/src/components/Svg/Svg.tsx @@ -1,5 +1,34 @@ -const Svg = ({ name, className: className2 = '', strokeWidth = 2 }) => { - const svgs = { +type SvgNames = 'arrow-down' | + 'arrow' | + 'arrow-left' | + 'big-gear' | + 'camera' | + 'checkmark' | + 'chevron-down' | + 'dots-vertical' | + 'drag-grid' | + 'exclamation-circle' | + 'favicon' | + 'flag' | + 'fork' | + 'gear' | + 'lightbulb' | + 'logout' | + 'pencil' | + 'plus' | + 'plus-circle' | + 'refresh' | + 'save' | + 'terminal' | + 'trash' | + 'x' + +const Svg = ({ name, className: className2 = '', strokeWidth = 2 }: { + name: SvgNames + className?: string + strokeWidth?: number +}) => { + const svgs: {[name in SvgNames]: React.ReactElement} = { 'arrow-down': ( { /> ), + 'big-gear': ( + + + + ), lightbulb: (