rename prop
This commit is contained in:
@@ -20,7 +20,7 @@ export const ConfirmTx: React.FC<{
|
||||
okLabel="Confirm"
|
||||
onOk={onConfirm}
|
||||
onClose={onClose}
|
||||
onSecondaryAction={onPrev}
|
||||
onBack={onPrev}
|
||||
>
|
||||
<Box sx={{ mt: 3 }}>
|
||||
{children}
|
||||
|
||||
@@ -180,7 +180,7 @@ export const withBackButton = () => {
|
||||
onOk={async () => setOpen(false)}
|
||||
header="This is a modal"
|
||||
okLabel="Primary action"
|
||||
onSecondaryAction={() => setOpen(false)}
|
||||
onBack={() => setOpen(false)}
|
||||
>
|
||||
<p>
|
||||
Tempor culpa est magna. Sit tempor cillum culpa sint ipsum nostrud ullamco voluptate exercitation dolore magna
|
||||
|
||||
@@ -13,7 +13,7 @@ export const SimpleModal: React.FC<{
|
||||
subHeaderStyles?: SxProps;
|
||||
onClose?: () => void;
|
||||
onOk?: () => Promise<void>;
|
||||
onSecondaryAction?: () => void;
|
||||
onBack?: () => void;
|
||||
header: string;
|
||||
subHeader?: string;
|
||||
okLabel: string;
|
||||
@@ -28,7 +28,7 @@ export const SimpleModal: React.FC<{
|
||||
onClose,
|
||||
okDisabled,
|
||||
onOk,
|
||||
onSecondaryAction,
|
||||
onBack,
|
||||
header,
|
||||
subHeader,
|
||||
okLabel,
|
||||
@@ -59,7 +59,7 @@ export const SimpleModal: React.FC<{
|
||||
{children}
|
||||
|
||||
<Box sx={{ display: 'flex', alignItems: 'center', gap: 2, mt: 2 }}>
|
||||
{onSecondaryAction && <StyledBackButton onBack={onSecondaryAction} />}
|
||||
{onBack && <StyledBackButton onBack={onBack} />}
|
||||
<Button variant="contained" fullWidth size="large" onClick={onOk} disabled={okDisabled}>
|
||||
{okLabel}
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user