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

View File

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