mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-23 00:22:19 +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 = ({
|
export const CreateButton = ({
|
||||||
name,
|
name,
|
||||||
permission,
|
|
||||||
...rest
|
...rest
|
||||||
}: ICreateButtonProps) => {
|
}: ICreateButtonProps) => {
|
||||||
return (
|
return (
|
||||||
<PermissionButton permission={permission} type="submit" {...rest}>
|
<PermissionButton type="submit" {...rest}>
|
||||||
Create {name}
|
Create {name}
|
||||||
</PermissionButton>
|
</PermissionButton>
|
||||||
);
|
);
|
||||||
|
@ -2,11 +2,9 @@ import PermissionButton, {
|
|||||||
IPermissionButtonProps,
|
IPermissionButtonProps,
|
||||||
} from '../PermissionButton/PermissionButton';
|
} from '../PermissionButton/PermissionButton';
|
||||||
|
|
||||||
interface IUpdateButtonProps extends IPermissionButtonProps {}
|
export const UpdateButton = ({ ...rest }: IPermissionButtonProps) => {
|
||||||
|
|
||||||
export const UpdateButton = ({ permission, ...rest }: IUpdateButtonProps) => {
|
|
||||||
return (
|
return (
|
||||||
<PermissionButton permission={permission} type="submit" {...rest}>
|
<PermissionButton type="submit" {...rest}>
|
||||||
Save
|
Save
|
||||||
</PermissionButton>
|
</PermissionButton>
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user