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

fix: TextInput border being cut out #2786

Merged
merged 1 commit into from
Jun 24, 2021

Conversation

brunohkbx
Copy link
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

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

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

.

Copy link
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.

example/src/Examples/TextInputExample.tsx Outdated Show resolved Hide resolved
@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

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

@zoobibackups
Copy link

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
Collaborator Author

@zoobibackups which version are you using?

@lukewalczak
Copy link
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