import { styled } from '@linaria/react'; import { Trans } from '@lingui/react/macro'; import { useId } from 'react'; import { Checkbox } from 'twenty-ui/input'; import { themeCssVariables } from 'twenty-ui/theme-constants'; const StyledContent = styled.div` align-items: center; display: flex; flex-direction: column; gap: ${themeCssVariables.spacing[4]}; overflow-wrap: anywhere; `; const StyledTrustRow = styled.div` align-items: center; align-self: stretch; display: flex; gap: ${themeCssVariables.spacing[2]}; text-align: left; `; const StyledTrustLabel = styled.span` cursor: pointer; `; type FrontComponentExternalLinkModalSubtitleProps = { url: string; origin: string; shouldTrustOrigin: boolean; onShouldTrustOriginChange: (shouldTrustOrigin: boolean) => void; }; export const FrontComponentExternalLinkModalSubtitle = ({ url, origin, shouldTrustOrigin, onShouldTrustOriginChange, }: FrontComponentExternalLinkModalSubtitleProps) => { const trustOriginLabelId = useId(); return ( This link will take you to an external site: {url} onShouldTrustOriginChange(!shouldTrustOrigin)} > Don't ask again for {origin} ); };