ui-rn 1.0.10 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ui-rn",
3
- "version": "1.0.10",
3
+ "version": "1.0.11",
4
4
  "repository": "https://github.com/phamha98/ui-rn",
5
5
  "description": "ui-rn",
6
6
  "author": "Phamha98",
@@ -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;