Skip to content

fix: TextInput border being cut out#2786

Merged
brunohkbx merged 1 commit intomainfrom
fix/text-input-border-being-cut-out
Jun 24, 2021
Merged

fix: TextInput border being cut out#2786
brunohkbx merged 1 commit intomainfrom
fix/text-input-border-being-cut-out

Conversation

@brunohkbx
Copy link
Copy Markdown
Collaborator

@brunohkbx brunohkbx commented Jun 23, 2021

Summary

Following up #2678. useTheme doesn't work in the component LabelBackground when you pass a custom theme to the TextInput as in the example below:

<TextInput
  mode="outlined"
  label="Test"
  theme={{
    roundness: 25,
  }}
  underlineColor="red"
  value="custom rounded input"
/>

The solution was to pass the prop roundness along under the labelProps

Before After
before after

Test plan

  1. Check it out in the example app

@callstack-bot
Copy link
Copy Markdown

callstack-bot commented Jun 23, 2021

Hey @brunohkbx, thank you for your pull request 🤗. The documentation from this branch can be viewed here.

@github-actions
Copy link
Copy Markdown

The mobile version of example app from this branch is ready! You can see it here

.

Copy link
Copy Markdown
Member

@lukewalczak lukewalczak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for that fix @brunohkbx 🎉 , left one small nit.

Comment thread example/src/Examples/TextInputExample.tsx Outdated
@brunohkbx brunohkbx force-pushed the fix/text-input-border-being-cut-out branch from 8ef6f14 to fb2e2f2 Compare June 24, 2021 12:17
@brunohkbx brunohkbx merged commit d4c594b into main Jun 24, 2021
@brunohkbx brunohkbx deleted the fix/text-input-border-being-cut-out branch June 24, 2021 12:28
@rahmanharoon
Copy link
Copy Markdown

How can I move that label to right side? Is their any method to do that

@zoobibackups
Copy link
Copy Markdown

zoobibackups commented Oct 22, 2021

Summary

Following up #2678. useTheme doesn't work in the component LabelBackground when you pass a custom theme to the TextInput as in the example below:

<TextInput
  mode="outlined"
  label="Test"
  theme={{
    roundness: 25,
  }}
  underlineColor="red"
  value="custom rounded input"
/>

The solution was to pass the prop roundness along under the labelProps

Before After
before after

Test plan

  1. Check it out in the example app

Can you provide the solution(code) because I am still facing the issue

<TextInput
        placeholder="Enter your email"
        mode="outlined"
        label="Email"
        theme={{roundness:30}}
       
    />

@brunohkbx
Copy link
Copy Markdown
Collaborator Author

@zoobibackups which version are you using?

@lukewalczak
Copy link
Copy Markdown
Member

Probably that fix is not released yet, let's try to install the library from the main branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

5 participants