mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	refactor: update Create and Update buttons types
This commit is contained in:
		
							parent
							
								
									5371e15333
								
							
						
					
					
						commit
						96dc6e811a
					
				| @ -8,11 +8,10 @@ interface ICreateButtonProps extends IPermissionButtonProps { | ||||
| 
 | ||||
| export const CreateButton = ({ | ||||
|     name, | ||||
|     permission, | ||||
|     ...rest | ||||
| }: ICreateButtonProps) => { | ||||
|     return ( | ||||
|         <PermissionButton permission={permission} type="submit" {...rest}> | ||||
|         <PermissionButton type="submit" {...rest}> | ||||
|             Create {name} | ||||
|         </PermissionButton> | ||||
|     ); | ||||
|  | ||||
| @ -2,11 +2,9 @@ import PermissionButton, { | ||||
|     IPermissionButtonProps, | ||||
| } from '../PermissionButton/PermissionButton'; | ||||
| 
 | ||||
| interface IUpdateButtonProps extends IPermissionButtonProps {} | ||||
| 
 | ||||
| export const UpdateButton = ({ permission, ...rest }: IUpdateButtonProps) => { | ||||
| export const UpdateButton = ({ ...rest }: IPermissionButtonProps) => { | ||||
|     return ( | ||||
|         <PermissionButton permission={permission} type="submit" {...rest}> | ||||
|         <PermissionButton type="submit" {...rest}> | ||||
|             Save | ||||
|         </PermissionButton> | ||||
|     ); | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user