mirror of
https://github.com/kevinsqi/react-circular-progressbar.git
synced 2026-01-25 16:03:15 +00:00
add note on react-native, update readme
This commit is contained in:
parent
cd5895af9f
commit
9375ff9742
11
README.md
11
README.md
@ -161,7 +161,11 @@ If you want to animate the text as well, you can! You'll instead control the `pe
|
||||
|
||||
## Fixing text centering in Internet Explorer (IE)
|
||||
|
||||
Because the `dominant-baseline` CSS property does not work in IE, the percentage text may not be centered. You can work around this by setting the `text` prop to be a `<tspan>` element and then adjusting the `dy` vertical offset, like so:
|
||||
Because the `dominant-baseline` CSS property does not work in IE, the percentage text may not be centered.
|
||||
|
||||
A solid cross-browser way to fix this is to use [this approach for overlaying arbitrary content inside the progressbar](https://github.com/iqnivek/react-circular-progressbar#customizing-the-textcontent-inside-progressbar).
|
||||
|
||||
However, if you don't want to do that, you can also work around this by setting the `text` prop to be a `<tspan>` element and then adjusting the `dy` vertical offset, like so:
|
||||
|
||||
```jsx
|
||||
// Use feature or browser detection to determine if IE
|
||||
@ -185,6 +189,11 @@ const needDominantBaselineFix = ...
|
||||
* [Creating a countdown timer](https://github.com/iqnivek/react-circular-progressbar/issues/52)
|
||||
|
||||
|
||||
## Supported platforms
|
||||
|
||||
react-circular-progressbar does not work with React Native, because React Native does not support `<svg>` out of the box.
|
||||
|
||||
|
||||
## Contributing
|
||||
|
||||
Take a look at [CONTRIBUTING.md](/CONTRIBUTING.md) to see how to help contribute to react-circular-progressbar.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user