1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-25 00:07:47 +01:00

refactor: use onClose instead of hideSecondaryButton (#842)

This commit is contained in:
olav 2022-04-05 11:47:17 +02:00 committed by GitHub
parent 6f072afbf4
commit 43834be065
2 changed files with 1 additions and 4 deletions

View File

@ -24,7 +24,6 @@ interface IDialogue {
disabledPrimaryButton?: boolean;
formId?: string;
permissionButton?: JSX.Element;
hideSecondaryButton?: boolean;
}
const Dialogue: React.FC<IDialogue> = ({
@ -40,7 +39,6 @@ const Dialogue: React.FC<IDialogue> = ({
fullWidth = false,
formId,
permissionButton,
hideSecondaryButton,
}) => {
const styles = useStyles();
const handleClick = formId
@ -94,7 +92,7 @@ const Dialogue: React.FC<IDialogue> = ({
/>
<ConditionallyRender
condition={Boolean(onClose || !hideSecondaryButton)}
condition={Boolean(onClose)}
show={
<Button onClick={onClose}>
{secondaryButtonText || 'No, take me back'}

View File

@ -32,7 +32,6 @@ export const SegmentDeleteUsedSegment = ({
open={open}
primaryButtonText="OK"
onClick={handleCancel}
hideSecondaryButton
>
<p>
The following feature toggles are using the{' '}