mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	refactor: use onClose instead of hideSecondaryButton (#842)
This commit is contained in:
		
							parent
							
								
									6f072afbf4
								
							
						
					
					
						commit
						43834be065
					
				| @ -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'} | ||||
|  | ||||
| @ -32,7 +32,6 @@ export const SegmentDeleteUsedSegment = ({ | ||||
|             open={open} | ||||
|             primaryButtonText="OK" | ||||
|             onClick={handleCancel} | ||||
|             hideSecondaryButton | ||||
|         > | ||||
|             <p> | ||||
|                 The following feature toggles are using the{' '} | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user