-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add remote object integration preview
Closes #4548
- Loading branch information
1 parent
7e28378
commit 77f38a8
Showing
4 changed files
with
111 additions
and
0 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
...es/twenty-front/src/modules/settings/integrations/assets/preview-background.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions
15
packages/twenty-front/src/modules/settings/integrations/assets/sync.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
77 changes: 77 additions & 0 deletions
77
.../twenty-front/src/modules/settings/integrations/components/SettingsIntegrationPreview.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
import styled from '@emotion/styled'; | ||
|
||
import { Card } from '@/ui/layout/card/components/Card'; | ||
import { CardContent } from '@/ui/layout/card/components/CardContent'; | ||
|
||
import PreviewBackgroundImage from '../assets/preview-background.svg'; | ||
import SyncImage from '../assets/sync.svg?react'; | ||
|
||
type SettingsIntegrationPreviewProps = { | ||
integrationLogoUrl: string; | ||
}; | ||
|
||
const StyledCard = styled(Card)` | ||
border: 0; | ||
`; | ||
|
||
const StyledCardContent = styled(CardContent)` | ||
background-image: url(${PreviewBackgroundImage}); | ||
align-items: center; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
gap: ${({ theme }) => theme.spacing(1)}; | ||
height: ${({ theme }) => theme.spacing(28)}; | ||
`; | ||
|
||
const StyledLogosContainer = styled.div` | ||
align-items: center; | ||
display: flex; | ||
justify-content: center; | ||
gap: ${({ theme }) => theme.spacing(4)}; | ||
`; | ||
|
||
const StyledIntegrationLogoContainer = styled.div` | ||
align-items: center; | ||
display: flex; | ||
height: ${({ theme }) => theme.spacing(16)}; | ||
justify-content: center; | ||
width: ${({ theme }) => theme.spacing(16)}; | ||
`; | ||
|
||
const StyledIntegrationLogo = styled.img` | ||
height: 100%; | ||
`; | ||
|
||
const StyledTwentyLogo = styled.img` | ||
height: ${({ theme }) => theme.spacing(12)}; | ||
padding: ${({ theme }) => theme.spacing(2)}; | ||
`; | ||
|
||
const StyledSyncImage = styled(SyncImage)` | ||
width: ${({ theme }) => theme.spacing(31)}; | ||
`; | ||
|
||
const StyledLabel = styled.div` | ||
color: ${({ theme }) => theme.font.color.tertiary}; | ||
font-size: ${({ theme }) => theme.font.size.sm}; | ||
font-weight: ${({ theme }) => theme.font.weight.medium}; | ||
line-height: ${({ theme }) => theme.spacing(6)}; | ||
`; | ||
|
||
export const SettingsIntegrationPreview = ({ | ||
integrationLogoUrl, | ||
}: SettingsIntegrationPreviewProps) => ( | ||
<StyledCard> | ||
<StyledCardContent> | ||
<StyledLogosContainer> | ||
<StyledIntegrationLogoContainer> | ||
<StyledIntegrationLogo alt="" src={integrationLogoUrl} /> | ||
</StyledIntegrationLogoContainer> | ||
<StyledSyncImage /> | ||
<StyledTwentyLogo alt="" src="/images/integrations/twenty-logo.svg" /> | ||
</StyledLogosContainer> | ||
<StyledLabel>Import your tables as remote objects</StyledLabel> | ||
</StyledCardContent> | ||
</StyledCard> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters