rename prop

This commit is contained in:
fmtabbara
2022-07-05 14:10:54 +01:00
parent 3cb08a410e
commit 1fc3c9f31c
3 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -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>