Show a footer Remove on selected create-flow modules so removal is not kebab-only.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -7,10 +7,13 @@ import type { ModalFooterProps } from "./ModalFooter.types";
|
||||
export function ModalFooterView({
|
||||
showBackButton = false,
|
||||
showNextButton = false,
|
||||
showRemoveButton = false,
|
||||
onBack,
|
||||
onNext,
|
||||
onRemove,
|
||||
backButtonText,
|
||||
nextButtonText,
|
||||
removeButtonText,
|
||||
nextButtonDisabled = false,
|
||||
currentStep,
|
||||
totalSteps,
|
||||
@@ -22,12 +25,26 @@ export function ModalFooterView({
|
||||
stepperProp !== undefined
|
||||
? stepperProp
|
||||
: currentStep !== undefined && totalSteps !== undefined;
|
||||
const showStartBack = showBackButton && !showRemoveButton;
|
||||
|
||||
return (
|
||||
<div
|
||||
className={`h-[64px] bg-[var(--color-surface-default-primary)] rounded-bl-[var(--radius-300,12px)] rounded-br-[var(--radius-300,12px)] shrink-0 relative ${className}`}
|
||||
>
|
||||
{showBackButton && (
|
||||
{showRemoveButton && (
|
||||
<div className="absolute left-[16px] top-[12px]">
|
||||
<Button
|
||||
buttonType="danger"
|
||||
palette="default"
|
||||
size="medium"
|
||||
onClick={onRemove}
|
||||
>
|
||||
{removeButtonText}
|
||||
</Button>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{showStartBack && (
|
||||
<div className="absolute left-[16px] top-[12px]">
|
||||
<Button
|
||||
buttonType="outline"
|
||||
|
||||
Reference in New Issue
Block a user