diff --git a/src/frontend/src/modals/importModal/buttonBox/index.tsx b/src/frontend/src/modals/importModal/buttonBox/index.tsx index 3645a31b9..2bd124bd7 100644 --- a/src/frontend/src/modals/importModal/buttonBox/index.tsx +++ b/src/frontend/src/modals/importModal/buttonBox/index.tsx @@ -9,7 +9,8 @@ export default function ButtonBox({ icon, bgColor, textColor, - deactivate + deactivate, + size }: { onClick: () => void; title: string; @@ -18,27 +19,80 @@ export default function ButtonBox({ bgColor: string; textColor: string; deactivate?:boolean; + size:"small"|"medium"|"big"; }) { + let bigCircle:string; + let smallCircle:string; + let titleFontSize:string; + let descriptionFontSize:string; + let padding:string; + let marginTop:string; + let height:string; + let widht:string; + switch(size){ + case "small": + bigCircle="h-12 w-12"; + smallCircle ="h-8 w-8"; + titleFontSize="text-sm"; + descriptionFontSize="text-xs"; + padding="p-2"; + marginTop="mt-2"; + height="h-36"; + widht="w-28"; + break; + case "medium": + bigCircle="h-16 w-16"; + smallCircle ="h-12 w-12"; + titleFontSize="text-base"; + descriptionFontSize="text-sm"; + padding="p-4"; + marginTop="mt-3"; + height="h-44"; + widht="w-36"; + break; + case "big": + bigCircle="h-20 w-20"; + smallCircle ="h-16 w-16"; + titleFontSize="text-lg"; + descriptionFontSize="text-sm"; + padding="p-8"; + marginTop="mt-6"; + height="h-56"; + widht="w-44"; + break; + default: + bigCircle="h-20 w-20"; + smallCircle ="h-16 w-16"; + titleFontSize="text-lg"; + descriptionFontSize="text-sm"; + padding="p-8"; + marginTop="mt-6"; + height="h-56"; + widht="w-44"; + break; + } return ( + {showExamples && ( +
+ +
+ )}
@@ -110,16 +127,24 @@ export default function ImportModal() {
-
+
{!showExamples && (
} - onClick={() =>{ + onClick={() => { setShowExamples(true); handleExamples(); }} @@ -127,6 +152,7 @@ export default function ImportModal() { title="Examples" >
)} - {showExamples && !loadingExamples && ( -
- {examples.map((example, index) => { - return
{example.name}
; - })} -
- )} + {showExamples && + !loadingExamples && + examples.map((example, index) => { + return ( +
+ {" "} + + } + onClick={() => { + console.log("click"); + }} + textColor="text-slate-400" + title={example.name} + > +
+ ); + })}