Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The input padding is incorrect #76

Open
wrangelvid opened this issue Jun 6, 2024 · 1 comment
Open

The input padding is incorrect #76

wrangelvid opened this issue Jun 6, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@wrangelvid
Copy link
Contributor

No matter what the values in the input padding are set to, the text stays centered in the box.
Here is a runnable example where we compare an Input component to a Container with a Text component. The text in the container seems to be correctly placed at the flex start with different paddings while the input component seems to either always center the text, even with textAlign and verticalAlign, or use the paddings in a way I wouldn't expect it to.

      <Root gap={20}>
        <Input
          borderWidth={2}
          borderRadius={6}
          paddingTop={2}
          paddingBottom={30}
          paddingLeft={10}
          paddingRight={30}
          textAlign="left"
          verticalAlign="top"
          focus={{ borderColor: 'orange' }}
          borderColor="black"
          value={text}
          onValueChange={setText}
        />
        <Container
          borderWidth={2}
          borderRadius={6}
          borderColor="gray"
          paddingTop={2}
          paddingBottom={30}
          paddingLeft={10}
          paddingRight={30}
        >
          <Text> Text Container </Text>
        </Container>
      </Root>
``
@bbohlender
Copy link
Contributor

Thanks for the example 👌. I understand now and will investiagte

@bbohlender bbohlender changed the title The input padding is not intuitive The input padding is incorrect Jun 6, 2024
@bbohlender bbohlender added the bug Something isn't working label Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants