ui-rn 1.0.3 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,10 +1,17 @@
1
1
  {
2
2
  "name": "ui-rn",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "repository": "https://github.com/phamha98/ui-rn",
5
5
  "description": "ui-rn",
6
6
  "author": "Phamha98",
7
7
  "main": "src/index.tsx",
8
+ "dependencies": {
9
+ "underscore": "^1.13.6",
10
+ "@types/underscore": "^1.11.15",
11
+ "validate-color": "^2.2.4",
12
+ "react-native-safe-area-view": "^1.1.1",
13
+ "react-native-linear-gradient": "^2.8.3"
14
+ },
8
15
  "scripts": {
9
16
  "test": "echo \"Error: no test specified\" && exit 1"
10
17
  },
package/src/Layout.tsx ADDED
@@ -0,0 +1,43 @@
1
+ import React from 'react'
2
+ import SafeAreaView, { ForceInsetProp } from 'react-native-safe-area-view'
3
+ import { Platform, StyleProp, ViewStyle } from 'react-native'
4
+ export interface LayoutAppProps {
5
+ children?: any
6
+ forceInset?: ForceInsetProp
7
+ forceInsetBot?: ForceInsetProp
8
+ styleBot?: StyleProp<ViewStyle> | undefined
9
+ style?: StyleProp<ViewStyle> | undefined
10
+ isBack?: boolean
11
+ disable?: boolean
12
+ }
13
+ export default function Layout({
14
+ children,
15
+ forceInset = { top: 'always', horizontal: 'never', bottom: 'never' },
16
+ forceInsetBot = { vertical: 'never' },
17
+ styleBot,
18
+ style,
19
+ disable,
20
+ }: LayoutAppProps) {
21
+ if (disable) return <>{children}</>
22
+ return (
23
+ <SafeAreaView
24
+ style={[
25
+ {
26
+ flex: 1,
27
+ },
28
+ style,
29
+ ]}
30
+ forceInset={forceInset}>
31
+ <SafeAreaView
32
+ style={[
33
+ {
34
+ flex: 1,
35
+ },
36
+ styleBot,
37
+ ]}
38
+ forceInset={forceInsetBot}>
39
+ {children}
40
+ </SafeAreaView>
41
+ </SafeAreaView>
42
+ )
43
+ }
package/src/index.tsx CHANGED
@@ -1,4 +1,5 @@
1
1
  export { default as Touch } from './Touch/Touch'
2
2
  export { default as Block } from './Touch/Block'
3
3
  export { default as Text } from './Text'
4
- export { default as Icon } from './Icon'
4
+ export { default as Icon } from './Icon'
5
+ export { default as Layout } from './Layout'