forked from twentyhq/twenty
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add Contact Auto-Creation calendar settings (twentyhq#4132)
* feat: add Contact Auto-Creation calendar settings Closes twentyhq#4065 * fix: fix wrong Section component import * fix: fix wrong Toggle import
- Loading branch information
1 parent
d5e8844
commit 292e97a
Showing
6 changed files
with
115 additions
and
143 deletions.
There are no files selected for viewing
57 changes: 0 additions & 57 deletions
57
.../settings/accounts/components/SettingsAccountsInboxSettingsContactAutoCreationSection.tsx
This file was deleted.
Oops, something went wrong.
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
57 changes: 0 additions & 57 deletions
57
...front/src/modules/settings/accounts/components/SettingsAccountsSynchronizationSection.tsx
This file was deleted.
Oops, something went wrong.
49 changes: 49 additions & 0 deletions
49
...enty-front/src/modules/settings/accounts/components/SettingsAccountsToggleSettingCard.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,49 @@ | ||
import { useTheme } from '@emotion/react'; | ||
import styled from '@emotion/styled'; | ||
|
||
import { SettingsAccountsCardMedia } from '@/settings/accounts/components/SettingsAccountsCardMedia'; | ||
import { IconComponent } from '@/ui/display/icon/types/IconComponent'; | ||
import { Toggle } from '@/ui/input/components/Toggle'; | ||
import { Card } from '@/ui/layout/card/components/Card'; | ||
import { CardContent } from '@/ui/layout/card/components/CardContent'; | ||
|
||
type SettingsAccountsToggleSettingCardProps = { | ||
Icon: IconComponent; | ||
isEnabled: boolean; | ||
onToggle: (value: boolean) => void; | ||
title: string; | ||
}; | ||
|
||
const StyledCardContent = styled(CardContent)` | ||
align-items: center; | ||
display: flex; | ||
gap: ${({ theme }) => theme.spacing(4)}; | ||
padding: ${({ theme }) => theme.spacing(2, 4)}; | ||
`; | ||
|
||
const StyledTitle = styled.span` | ||
color: ${({ theme }) => theme.font.color.primary}; | ||
font-weight: ${({ theme }) => theme.font.weight.medium}; | ||
margin-right: auto; | ||
`; | ||
|
||
export const SettingsAccountsToggleSettingCard = ({ | ||
Icon, | ||
isEnabled, | ||
onToggle, | ||
title, | ||
}: SettingsAccountsToggleSettingCardProps) => { | ||
const theme = useTheme(); | ||
|
||
return ( | ||
<Card> | ||
<StyledCardContent> | ||
<SettingsAccountsCardMedia> | ||
<Icon size={theme.icon.size.sm} stroke={theme.icon.stroke.lg} /> | ||
</SettingsAccountsCardMedia> | ||
<StyledTitle>{title}</StyledTitle> | ||
<Toggle value={isEnabled} onChange={onToggle} /> | ||
</StyledCardContent> | ||
</Card> | ||
); | ||
}; |
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
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