1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-07-12 13:48:35 +02:00
unleash.unleash/frontend/src/component/common/UpdateButton/UpdateButton.tsx
Thomas Heartman 7cab19d9d2
#4209: add 'add to draft' button for segments. (#4400)
Note: it doesn't work yet! It just throws an error.

This PR adds some logic to conditionally display "Add to draft" button
for segments if the segment is part of a project that has change
requests enabled and the flag is enabled.

Also adds a flag (`segmentChangeRequests`) to the frontend.

Holding off on actually adding the change to a draft until the API/orval
has been updated with the most recent changes.
2023-08-03 14:34:38 +02:00

15 lines
340 B
TypeScript

import PermissionButton, {
IPermissionButtonProps,
} from 'component/common/PermissionButton/PermissionButton';
export const UpdateButton = ({
children = 'Save',
...rest
}: IPermissionButtonProps) => {
return (
<PermissionButton type="submit" {...rest}>
{children}
</PermissionButton>
);
};