This PR was created by [GitStart](https://gitstart.com/) to address the requirements from this ticket: [TWNTY-7529](https://clients.gitstart.com/twenty/5449/tickets/TWNTY-7529). --- ### Description - Migrated all button components to `twenty-ui` \ \ `Button`\ `ButtonGroup`\ `ColorPickerButton`\ `FloatingButton`\ `FloatingButtonGroup`\ `FloatingIconButton`\ `FloatingIconButtonGroup`\ `IconButton`\ `IconButtonGroup`\ `LightButton`\ `LightIconButton`\ `LightIconButtonGroup`\ `MainButton`\ \ Fixes twentyhq/private-issues#89 Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com> Co-authored-by: Charles Bochet <charles@twenty.com>
37 lines
999 B
TypeScript
37 lines
999 B
TypeScript
import { FetchResult } from '@apollo/client';
|
|
import styled from '@emotion/styled';
|
|
import { Button, IconReload } from 'twenty-ui';
|
|
|
|
import { SyncRemoteTableSchemaChangesMutation } from '~/generated-metadata/graphql';
|
|
|
|
const StyledText = styled.h3`
|
|
color: ${({ theme }) => theme.font.color.tertiary};
|
|
font-size: ${({ theme }) => theme.font.size.md};
|
|
font-weight: ${({ theme }) => theme.font.weight.regular};
|
|
margin: 0;
|
|
`;
|
|
|
|
type SettingsIntegrationRemoteTableSchemaUpdateProps = {
|
|
updatesText: string;
|
|
onUpdate: () => Promise<FetchResult<SyncRemoteTableSchemaChangesMutation>>;
|
|
};
|
|
|
|
export const SettingsIntegrationRemoteTableSchemaUpdate = ({
|
|
updatesText,
|
|
onUpdate,
|
|
}: SettingsIntegrationRemoteTableSchemaUpdateProps) => {
|
|
return (
|
|
<>
|
|
{updatesText && <StyledText>{updatesText}</StyledText>}
|
|
{updatesText && (
|
|
<Button
|
|
Icon={IconReload}
|
|
title="Update"
|
|
size="small"
|
|
onClick={onUpdate}
|
|
/>
|
|
)}
|
|
</>
|
|
);
|
|
};
|