add note on react-native, update readme

This commit is contained in:
Kevin Qi 2019-02-16 14:19:18 -08:00
parent cd5895af9f
commit 9375ff9742

View File

@ -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.