[FIX] remove blue outline for Phones, Emails, and Domains fields (#8268)

FIX: #8252

---------

Co-authored-by: Félix Malfait <felix@twenty.com>
This commit is contained in:
Hitarth Sheth
2024-11-04 02:32:27 -05:00
committed by GitHub
parent 8b1f34dbfb
commit b66bdd9de5
2 changed files with 8 additions and 15 deletions

View File

@@ -77,10 +77,12 @@ export const FieldsCard = ({
const boxedRelationFieldMetadataItems = relationFieldMetadataItems?.filter( const boxedRelationFieldMetadataItems = relationFieldMetadataItems?.filter(
(fieldMetadataItem) => (fieldMetadataItem) =>
!((objectNameSingular === CoreObjectNameSingular.Note && !(
fieldMetadataItem.name === 'noteTargets') || (objectNameSingular === CoreObjectNameSingular.Note &&
(objectNameSingular === CoreObjectNameSingular.Task && fieldMetadataItem.name === 'noteTargets') ||
fieldMetadataItem.name === 'taskTargets')), (objectNameSingular === CoreObjectNameSingular.Task &&
fieldMetadataItem.name === 'taskTargets')
),
); );
const isReadOnly = objectMetadataItem.isRemote; const isReadOnly = objectMetadataItem.isRemote;

View File

@@ -2,7 +2,7 @@ import { css } from '@emotion/react';
import styled from '@emotion/styled'; import styled from '@emotion/styled';
import { forwardRef, InputHTMLAttributes, ReactNode, useRef } from 'react'; import { forwardRef, InputHTMLAttributes, ReactNode, useRef } from 'react';
import 'react-phone-number-input/style.css'; import 'react-phone-number-input/style.css';
import { RGBA, TEXT_INPUT_STYLE } from 'twenty-ui'; import { TEXT_INPUT_STYLE } from 'twenty-ui';
import { useRegisterInputEvents } from '@/object-record/record-field/meta-types/input/hooks/useRegisterInputEvents'; import { useRegisterInputEvents } from '@/object-record/record-field/meta-types/input/hooks/useRegisterInputEvents';
import { useCombinedRefs } from '~/hooks/useCombinedRefs'; import { useCombinedRefs } from '~/hooks/useCombinedRefs';
@@ -22,14 +22,6 @@ const StyledInput = styled.input<{
position: relative; position: relative;
width: 100%; width: 100%;
&:focus {
${({ theme, hasError = false }) => {
if (hasError) return '';
return `box-shadow: 0px 0px 0px 3px ${RGBA(theme.color.blue, 0.1)};
border-color: ${theme.color.blue};`;
}};
}
${({ withRightComponent }) => ${({ withRightComponent }) =>
withRightComponent && withRightComponent &&
css` css`
@@ -53,8 +45,7 @@ const StyledRightContainer = styled.div`
const StyledErrorDiv = styled.div` const StyledErrorDiv = styled.div`
color: ${({ theme }) => theme.color.red}; color: ${({ theme }) => theme.color.red};
padding: 0 ${({ theme }) => theme.spacing(2)} padding: 0 ${({ theme }) => theme.spacing(2)};
${({ theme }) => theme.spacing(1)};
`; `;
type HTMLInputProps = InputHTMLAttributes<HTMLInputElement>; type HTMLInputProps = InputHTMLAttributes<HTMLInputElement>;