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

Apply border radius to inner view(progress bar) when applying padding to <Progress.Bar /> #240

Open
hardik-wts opened this issue Nov 28, 2021 · 5 comments

Comments

@hardik-wts
Copy link

Que : How to apply border raduis to inner view of progress bar

Version

"react": "16.13.1",
"react-native": "0.63.4",
"react-native-progress": "^5.0.0",

Expected output
Screenshot

Current behaviour
current_output
Code

<Progress.Bar
  color={'rgb(128,0,128)'}
  progress={0.5}
  borderWidth={1}
  borderColor={'rgba(128,0,128,0.2)'}
  unfilledColor={'white'}
  height={10}
  borderRadius={7.5}
  width={200}
  style={{ padding: 2, }}
/>

So after applying style with padding 2 I'll get the space for inner view
but when I try below code it wont work for me

style={{ padding: 2,borderRadius:10 }}

So how apply border radius for inner view as per expected output

@erickgtzh
Copy link

Did you find a solution?

@matandin
Copy link

@erickgtzh @hardik-wts Did you guys find a solution?

@paulolopesrb
Copy link

Has anyone got a solution? I have the same issue.

@Srijan67
Copy link

I had similar problem, I solved it by going to react-native-progress/bar file and adding borderRadius to progressStyle. It will give similar border as your outer container.
image

@luisfuertes
Copy link

And somebody know how do the same with Circle? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants