twenty icon indicating copy to clipboard operation
twenty copied to clipboard

Edit Company Name Offset Input

Open brendanlaschke opened this issue 9 months ago • 2 comments

Bug Description

Bildschirmfoto 2024-05-14 um 13 46 59

Offset of input.

Expected behavior

Input should be centered.

brendanlaschke avatar May 14 '24 19:05 brendanlaschke

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:

  1. Locate the FieldInput component in /packages/twenty-front/src/modules/object-record/record-field/components/FieldInput.tsx.
  2. Identify the specific input component used for the company name. It is likely one of the text input components such as TextFieldInput.
  3. Navigate to the relevant input component in /packages/twenty-front/src/modules/ui/input/components/TextInput.tsx or similar.
  4. Adjust the CSS styling to ensure the input is centered. For example, you can add or modify the style or className prop to include centering styles:
const StyledTextInput = styled.input`
  display: block;
  margin: 0 auto;
  text-align: center;
`;
  1. 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

Ask Greptile

greptile-apps[bot] avatar May 14 '24 19:05 greptile-apps[bot]

Good catch!

Screenshot 2024-05-15 at 07 53 38

Could be linked to this which we just merged: https://github.com/twentyhq/twenty/pull/4789

FelixMalfait avatar May 15 '24 05:05 FelixMalfait