fix: responsiveness share button

feat/list-projects
Arik Chakma 6 months ago
parent 8f6cdff0d8
commit e39fadb032
  1. 34
      src/components/Projects/StatusStepper/ProjectStepper.tsx

@ -138,7 +138,7 @@ export function ProjectStepper(props: ProjectStepperProps) {
)} )}
<div <div
className={cn( className={cn(
'flex items-center bg-gray-100 px-4 py-2 text-sm text-gray-500 transition-colors', 'bg-gray-100 px-4 py-2 text-sm text-gray-500 transition-colors sm:flex sm:items-center',
{ {
'bg-purple-600 text-white': isSticky, 'bg-purple-600 text-white': isSticky,
}, },
@ -170,7 +170,7 @@ export function ProjectStepper(props: ProjectStepperProps) {
> >
these tips these tips
</button> </button>
&nbsp; to get most out of it. &nbsp;to get most out of it.
</> </>
)} )}
{activeStep >= 2 && ( {activeStep >= 2 && (
@ -192,7 +192,7 @@ export function ProjectStepper(props: ProjectStepperProps) {
{activeStep >= 2 && ( {activeStep >= 2 && (
<button <button
className={cn( className={cn(
'ml-auto flex items-center gap-1 text-sm', 'ml-auto hidden items-center gap-1 text-sm sm:flex',
isCopied ? 'text-green-500' : '', isCopied ? 'text-green-500' : '',
)} )}
onClick={() => { onClick={() => {
@ -207,7 +207,8 @@ export function ProjectStepper(props: ProjectStepperProps) {
) : ( ) : (
<> <>
<Share className="h-3 w-3 stroke-[2.5px]" /> <Share className="h-3 w-3 stroke-[2.5px]" />
Share Solution <span className="hidden md:inline">Share Solution</span>
<span className="md:hidden">Share</span>
</> </>
)} )}
</button> </button>
@ -231,6 +232,7 @@ export function ProjectStepper(props: ProjectStepperProps) {
}} }}
/> />
<StepperStepSeparator isActive={activeStep > 0} /> <StepperStepSeparator isActive={activeStep > 0} />
<div className="flex items-center gap-2">
<StepperAction <StepperAction
isActive={activeStep === 1} isActive={activeStep === 1}
isCompleted={activeStep > 1} isCompleted={activeStep > 1}
@ -246,6 +248,30 @@ export function ProjectStepper(props: ProjectStepperProps) {
text={activeStep > 1 ? 'Submitted' : 'Submit Solution'} text={activeStep > 1 ? 'Submitted' : 'Submit Solution'}
number={2} number={2}
/> />
<span className="text-gray-600 sm:hidden">&middot;</span>
<button
className={cn(
'flex items-center gap-2 text-sm sm:hidden',
isCopied ? 'text-green-500' : 'text-gray-600',
)}
onClick={() => {
copyText(projectSolutionUrl);
}}
>
{isCopied ? (
<>
<CheckIcon additionalClasses="h-3 w-3" />
Copied
</>
) : (
<>
<Share className="h-3 w-3 stroke-[2.5px]" />
Share Solution
</>
)}
</button>
</div>
<StepperStepSeparator isActive={activeStep > 1} /> <StepperStepSeparator isActive={activeStep > 1} />
<MilestoneStep <MilestoneStep
isActive={activeStep === 2} isActive={activeStep === 2}

Loading…
Cancel
Save