Merge pull request #165 from FarazPatankar/master

add with-tailwind example
This commit is contained in:
Evan Bacon
2020-05-18 11:31:30 -07:00
committed by GitHub
3 changed files with 49 additions and 0 deletions

15
with-tailwind/App.js Normal file
View File

@@ -0,0 +1,15 @@
import React from 'react';
import { SafeAreaView, Text, View } from 'react-native';
import tailwind from 'tailwind-rn';
export default function App() {
return (
<SafeAreaView style={tailwind('flex-1 items-center justify-center')}>
<View style={tailwind('bg-blue-500 px-5 py-3 rounded-full')}>
<Text style={tailwind('text-white font-semibold text-lg')}>
Hello Tailwind 👋
</Text>
</View>
</SafeAreaView>
);
}

21
with-tailwind/README.md Normal file
View File

@@ -0,0 +1,21 @@
# Tailwind CSS example
<p>
<!-- iOS -->
<img alt="Supports Expo iOS" longdesc="Supports Expo iOS" src="https://img.shields.io/badge/iOS-4630EB.svg?style=flat-square&logo=APPLE&labelColor=999999&logoColor=fff" />
<!-- Android -->
<img alt="Supports Expo Android" longdesc="Supports Expo Android" src="https://img.shields.io/badge/Android-4630EB.svg?style=flat-square&logo=ANDROID&labelColor=A4C639&logoColor=fff" />
<!-- Web -->
<img alt="Supports Expo Web" longdesc="Supports Expo Web" src="https://img.shields.io/badge/web-4630EB.svg?style=flat-square&logo=GOOGLE-CHROME&labelColor=4285F4&logoColor=fff" />
</p>
## 🚀 How to use
- Install with `yarn` or `npm install`.
- Run `expo start` to try it out.
## 📝 Notes
- This example using the [`tailwind-rn`](https://github.com/vadimdemedes/tailwind-rn) library to allow you to use [Tailwind CSS](https://tailwindcss.com/) in React Native.
- You can even customize it to use your own styles or colors. Read more about that [here](https://github.com/vadimdemedes/tailwind-rn#customization).
- [Tailwind CSS Documentation](https://tailwindcss.com/docs/utility-first).

View File

@@ -0,0 +1,13 @@
{
"dependencies": {
"expo": "~37.0.3",
"react": "~16.9.0",
"react-dom": "~16.9.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-37.0.1.tar.gz",
"react-native-web": "~0.11.7",
"tailwind-rn": "^1.1.0"
},
"devDependencies": {
"@babel/core": "^7.8.6"
}
}