|
1 | 1 | ## Degree Component for React Native Apps |
| 2 | + |
| 3 | +A degree component for apps dealing with weather temperatures. for eg. 23 degree celcius, 41 degree fahrenheit. |
| 4 | +This component uses React Native <View /> component to create the circular structure rather than a png icon. Refer the screenshot below. |
| 5 | + |
| 6 | +##### Screenshot |
| 7 | +<img src="http://jsphkhan.github.io/DegreeComponent/degree.png" /> |
| 8 | + |
| 9 | +##### How to use? |
| 10 | +###### Import the component |
| 11 | +```bash |
| 12 | +var DegreeComponent = require('../Components/DegreeComponent'); |
| 13 | +``` |
| 14 | +###### Use it inside your render() method |
| 15 | +```bash |
| 16 | + <DegreeComponent style={{width:6, height: 6, borderRadius: 3, marginTop: -10}}></DegreeComponent> |
| 17 | +``` |
| 18 | + |
| 19 | +###### Define your own dimensions by changing attributes |
| 20 | +```bash |
| 21 | + <DegreeComponent style={{width:20, height: 20, borderRadius: 10, marginTop: 0}}></DegreeComponent> |
| 22 | +``` |
| 23 | + |
| 24 | + |
| 25 | +### Why this component? |
| 26 | +This component as such does not make any sense. But when I was developing the [Weather App](https://github.com/jsphkhan/ReactNativeExamples/blob/master/ios/WeatherApp/) I found the need for it. I prefered creating a component rather than using an image. |
| 27 | + |
| 28 | +### Questions? |
| 29 | +Feel free to contact me on [twitter](https://twitter.com/joseph_rialab) or [create an issue](https://github.com/jsphkhan/ReactNativeExamples/issues/new) |
| 30 | + |
| 31 | +###License |
| 32 | + |
| 33 | +####The MIT License (MIT) |
| 34 | + |
| 35 | +Permission is hereby granted, free of charge, to any person obtaining a copy |
| 36 | +of this software and associated documentation files (the "Software"), to deal |
| 37 | +in the Software without restriction, including without limitation the rights |
| 38 | +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 39 | +copies of the Software, and to permit persons to whom the Software is |
| 40 | +furnished to do so, subject to the following conditions: |
| 41 | + |
| 42 | +The above copyright notice and this permission notice shall be included in |
| 43 | +all copies or substantial portions of the Software. |
| 44 | + |
| 45 | +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 46 | +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 47 | +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 48 | +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 49 | +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 50 | +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
| 51 | +THE SOFTWARE. |
| 52 | + |
0 commit comments