twenty
twenty copied to clipboard
Edit Company Name Offset Input
Bug Description
Offset of input.
Expected behavior
Input should be centered.
Disclaimer: This comment was automatically generated with AI. It can give some useful hints as to where to look for, but sometimes it can also give very inaccurate answers so takes this with a pinch of salt :). To fix the offset issue for the company name input, follow these steps:
- Locate the
FieldInput
component in/packages/twenty-front/src/modules/object-record/record-field/components/FieldInput.tsx
. - Identify the specific input component used for the company name. It is likely one of the text input components such as
TextFieldInput
. - Navigate to the relevant input component in
/packages/twenty-front/src/modules/ui/input/components/TextInput.tsx
or similar. - Adjust the CSS styling to ensure the input is centered. For example, you can add or modify the
style
orclassName
prop to include centering styles:
const StyledTextInput = styled.input`
display: block;
margin: 0 auto;
text-align: center;
`;
- Apply the
StyledTextInput
to the input component:
<TextInput className={StyledTextInput} {...props} />
This should center the input field as expected.
References
/packages/twenty-front/src/modules/object-record/record-field/components/FieldInput.tsx /packages/twenty-front/src/modules/ui/input/components
Good catch!
Could be linked to this which we just merged: https://github.com/twentyhq/twenty/pull/4789