ui-rn 1.0.9 → 1.0.11

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/README.md CHANGED
@@ -7,22 +7,24 @@ npm install ui-rn
7
7
  ### Block :
8
8
 
9
9
  ```tsx
10
- import {Block, Text, Icon, Touch} from 'ui-rn';
11
- <Block
12
- mar-5
13
- pad-5
14
- red
15
- background={['red', 'blue']}
16
- positionOption={{top: 10, left: 5}}
17
- alignCenter
18
- borderCircle
19
- mid
20
- row
21
- width-150
22
- height-300>
23
- <Text size-14 red toUpperCase italic bold>
24
- Hello
25
- </Text>
26
- <Icon name="home" size-45 type="MaterialIcons" />
27
- </Block>;
10
+ import {Block, Text, Icon, Touch, Layout, LoadingView} from 'ui-rn';
11
+ <Layout>
12
+ <Block
13
+ mar-5
14
+ pad-5
15
+ red
16
+ background={['red', 'blue']}
17
+ positionOption={{top: 10, left: 5}}
18
+ alignCenter
19
+ borderCircle
20
+ mid
21
+ row
22
+ width-150
23
+ height-300>
24
+ <Text size-14 red toUpperCase italic bold>
25
+ Hello
26
+ </Text>
27
+ <Icon name="home" size-45 type="MaterialIcons" />
28
+ </Block>
29
+ </Layout>;
28
30
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ui-rn",
3
- "version": "1.0.9",
3
+ "version": "1.0.11",
4
4
  "repository": "https://github.com/phamha98/ui-rn",
5
5
  "description": "ui-rn",
6
6
  "author": "Phamha98",
@@ -11,7 +11,8 @@
11
11
  "validate-color": "^2.2.4",
12
12
  "react-native-safe-area-view": "^1.1.1",
13
13
  "react-native-linear-gradient": "^2.8.3",
14
- "react-native-indicators": "^0.17.0"
14
+ "react-native-indicators": "^0.17.0",
15
+ "react-native-dropdownalert": "^4.5.1"
15
16
  },
16
17
  "scripts": {
17
18
  "test": "echo \"Error: no test specified\" && exit 1"
package/src/Dropdown.tsx CHANGED
@@ -9,7 +9,7 @@ export default function AlertApp() {
9
9
  ref={ref}
10
10
  inactiveStatusBarBackgroundColor={'green'}
11
11
  updateStatusBar={false}
12
- errorColor={'#B57F00'}
12
+ errorColor={'#9A9891FFFF'}
13
13
  successColor={'#238209'}
14
14
  // errorImageSrc={Images('logo')}
15
15
  // successImageSrc={Images('logo')}
@@ -53,7 +53,7 @@ export default class IconApp extends React.PureComponent<Props> {
53
53
  }
54
54
  render() {
55
55
  const { size, color, style } = this.res
56
- console.debug('res', this.res)
56
+ // console.debug('res', this.res)
57
57
  if (this.props.name === "none") return null
58
58
  const IconView = RNVectorIcon[this.props.type || 'Ionicons']
59
59
  if (typeof this.props.onPress != "function") {
@@ -27,7 +27,7 @@ export const makeProps = (props: { [key: string]: any }) => {
27
27
  let res = { size: props.size ?? 23, color: props.color ?? 'gray', name: props.name ?? 'home' }
28
28
  Object.keys(props).forEach((key) => {
29
29
  const match = key.match(/^(\w+)-(\w+)$/) as string[]
30
- console.debug('COLORS11', key, COLORS[key])
30
+ // console.debug('COLORS11', key, COLORS[key])
31
31
  if (COLORS[key]) {
32
32
  console.debug('COLORS22', match)
33
33
  res['color'] = key
@@ -66,7 +66,7 @@ export const makeStyle = (props: { [key: string]: any }) => {
66
66
  Object.keys(props).forEach((key) => {
67
67
  const match = key.match(/^(\w+)-(\w+)$/) as string[]
68
68
  if (COLORS[key]) {
69
- style['colors'] = key
69
+ style['color'] = key
70
70
  }
71
71
  else if (match) {
72
72
  const value = isNaN(parseInt(match[2], 10)) ? match[2] : parseInt(match[2], 10)
@@ -62,15 +62,15 @@ export const makeStyle = (props: { [key: string]: any }) => {
62
62
  const style: { [key: string]: number | string } = {};
63
63
  Object.keys(props).forEach((key) => {
64
64
  const match = key.match(/^(\w+)-(\w+)$/) as string[]
65
- console.debug(key, match)
65
+ // console.debug(key, match)
66
66
  if (COLORS[key]) {
67
67
  style['backgroundColor'] = key
68
68
  }
69
69
  else if (match) {
70
70
  const value = isNaN(parseInt(match[2], 10)) ? match[2] : parseInt(match[2], 10)
71
- console.debug('value', value)
72
- console.debug('value', parseInt(match[2], 10))
73
- console.debug('value', isNumber(parseInt(match[2], 10)))
71
+ // console.debug('value', value)
72
+ // console.debug('value', parseInt(match[2], 10))
73
+ // console.debug('value', isNumber(parseInt(match[2], 10)))
74
74
  if (SHORT_VARIATIONS[match[1]]) style[SHORT_VARIATIONS[match[1]]] = value
75
75
  else style[match[1]] = value
76
76
  }
@@ -78,7 +78,7 @@ export const makeStyle = (props: { [key: string]: any }) => {
78
78
  if (SHORT_VARIATIONS[key]) {
79
79
  style[SHORT_VARIATIONS[key]] = props[key]
80
80
  }
81
- else style[key] = props[key]
81
+ // else style[key] = props[key]
82
82
  }
83
83
  });
84
84
  return StyleSheet.create({ style }).style;