Skip to content

Commit 1da5e47

Browse files
authored
Merge pull request #34 from adaptui/development
Development
2 parents c2c8612 + ed086e2 commit 1da5e47

File tree

211 files changed

+183283
-14284
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

211 files changed

+183283
-14284
lines changed

.eslintignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# don't ever lint node_modules
2+
node_modules
3+
# don't lint build output (make sure it's set to your correct build folder name)
4+
lib
5+
# don't lint nyc coverage output
6+
coverage
7+
8+
# dont have lint ios and android folders
9+
ios
10+
android
11+
12+
# basic js files of react native
13+
14+
.eslintrc.js
15+
babel.config.js
16+
jest.config.js
17+
metro.config.js
18+
tailwind.config.js
19+
20+
example
21+
22+
scripts
23+
24+
__tests__

.eslintrc.js

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
module.exports = {
2+
root: true,
3+
parser: '@typescript-eslint/parser',
4+
parserOptions: {
5+
project: './tsconfig.json',
6+
},
7+
env: {
8+
es6: true,
9+
node: true,
10+
jest: true,
11+
browser: true,
12+
'react-native/react-native': true,
13+
},
14+
extends: [
15+
'@react-native-community',
16+
'eslint:recommended',
17+
'plugin:react/recommended',
18+
'plugin:@typescript-eslint/eslint-recommended',
19+
'plugin:@typescript-eslint/recommended',
20+
'plugin:@typescript-eslint/recommended-requiring-type-checking',
21+
'prettier/@typescript-eslint',
22+
],
23+
plugins: ['react', 'react-hooks', '@typescript-eslint', 'prettier', '@react-native-community'],
24+
rules: {
25+
'react/prop-types': 'off',
26+
quotes: ['error', 'single'],
27+
'prettier/prettier': 'error',
28+
// React Native Rules
29+
'react-native/no-unused-styles': "error",
30+
'react-native/split-platform-components': "off",
31+
'react-native/no-raw-text': "off"
32+
},
33+
settings: {
34+
react: {
35+
version: 'detect',
36+
},
37+
},
38+
};

.expo-shared/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
> Why do I have a folder named ".expo-shared" in my project?
2+
3+
The ".expo-shared" folder is created when running commands that produce state that is intended to be shared with all developers on the project. For example, "npx expo-optimize".
4+
5+
> What does the "assets.json" file contain?
6+
7+
The "assets.json" file describes the assets that have been optimized through "expo-optimize" and do not need to be processed again.
8+
9+
> Should I commit the ".expo-shared" folder?
10+
11+
Yes, you should share the ".expo-shared" folder with your collaborators.

.expo-shared/assets.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"24272cdaeff82cc5facdaccd982a6f05b60c4504704bbf94c19a6388659880bb": true,
3+
"5f4c0a732b6325bf4071d9124d2ae67e037cb24fcc9c482ef82bea742109a3b8": true,
4+
"74c64047eb557b1341bba7a2831eedde9ddb705e6451a9ad9f5552bf558f13de": true,
5+
"bc25a616b4e31cf7300cd97b9cbf8894e855e6373aa797d0badd7e211111c5e5": true
6+
}

.ondevice/AppRoot.tsx

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import { createDrawerNavigator } from '@react-navigation/drawer';
2+
import React from 'react';
3+
import { Box, Text, useTheme } from '../src';
4+
5+
function HomeScreen() {
6+
const tailwind = useTheme();
7+
return (
8+
<Box style={tailwind.style('flex-1 justify-center items-center')}>
9+
<Text>Hello,World from Home Screen</Text>
10+
</Box>
11+
);
12+
}
13+
14+
const Drawer = createDrawerNavigator();
15+
16+
const AppRoot = () => {
17+
return (
18+
<Drawer.Navigator initialRouteName="Home">
19+
<Drawer.Screen name="Home" component={HomeScreen} />
20+
</Drawer.Navigator>
21+
);
22+
};
23+
24+
export default AppRoot;

.prettierrc.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module.exports = {
2+
useTabs: false,
3+
printWidth: 120,
4+
tabWidth: 2,
5+
singleQuote: true,
6+
jsxBracketSameLine: false,
7+
parser: 'typescript',
8+
semi: true,
9+
arrowParens: 'always',
10+
};

App.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import React from 'react';
2+
import { LogBox, SafeAreaView, StatusBar } from 'react-native';
3+
import 'react-native-gesture-handler';
4+
import { GestureHandlerRootView } from 'react-native-gesture-handler';
5+
import tailwind from 'twrnc';
6+
import AppRoot from './.ondevice/AppRoot';
7+
import { TailwindThemeProvider } from './src';
8+
import { NavigationContainer } from '@react-navigation/native';
9+
10+
LogBox.ignoreAllLogs();
11+
12+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
13+
const App = () => {
14+
return (
15+
<GestureHandlerRootView style={tailwind.style('flex-1')}>
16+
<NavigationContainer>
17+
<SafeAreaView
18+
style={tailwind.style(
19+
`flex-1 android:mt-[${StatusBar.currentHeight || 0}px]`
20+
)}
21+
>
22+
<TailwindThemeProvider>
23+
<AppRoot />
24+
</TailwindThemeProvider>
25+
</SafeAreaView>
26+
</NavigationContainer>
27+
</GestureHandlerRootView>
28+
);
29+
};
30+
31+
export default App;

README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,19 @@
1-
# react-native-system
1+
# react-native-tailwind
22

33
Collection of components that are accessible, composable, customizable from low level to build your own UI & Design System
44

55
## Installation
66

77
```sh
8-
npm install react-native-system
8+
npm install react-native-tailwind
99
```
1010

1111
## Usage
1212

1313
```js
14-
import System from "react-native-system";
14+
import { Button } from 'react-native-tailwind';
1515

16-
// ...
17-
18-
const result = await System.multiply(3, 7);
16+
<Button size="sm">Continue</Button>;
1917
```
2018

2119
## Contributing

app.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"expo": {
3+
"name": "React Native System Storybook",
4+
"slug": "react-native-system-storybook",
5+
"version": "1.0.0",
6+
"orientation": "portrait",
7+
"icon": "./assets/icon.png",
8+
"splash": {
9+
"image": "./assets/splash.png",
10+
"resizeMode": "contain",
11+
"backgroundColor": "#ffffff"
12+
},
13+
"updates": {
14+
"fallbackToCacheTimeout": 0
15+
},
16+
"assetBundlePatterns": [
17+
"**/*"
18+
],
19+
"ios": {
20+
"supportsTablet": true
21+
},
22+
"android": {
23+
"adaptiveIcon": {
24+
"foregroundImage": "./assets/adaptive-icon.png",
25+
"backgroundColor": "#FFFFFF"
26+
}
27+
},
28+
"web": {
29+
"favicon": "./assets/favicon.png"
30+
},
31+
"description": "Collection of components that are accessible, composable, customizable from low level to build your own UI & Design System"
32+
}
33+
}

assets/adaptive-icon.png

17.1 KB
Loading

0 commit comments

Comments
 (0)