vpt-sebraeds 0.0.10 → 0.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.
@@ -1,5 +1,5 @@
1
1
  import React, { useMemo, useState } from 'react';
2
- import { TouchableOpacity, Text, StyleSheet, View } from 'react-native';
2
+ import { TouchableOpacity, StyleSheet, View } from 'react-native';
3
3
  import SEIcon from '~/superApp/UI/SEIcon';
4
4
  import { SEText } from '~/UI';
5
5
 
@@ -125,6 +125,19 @@ const Button = ({
125
125
  }
126
126
  };
127
127
 
128
+ const getSETextType = () => {
129
+ switch (size) {
130
+ case 'large':
131
+ return 'button-large';
132
+ case 'medium':
133
+ return 'button-medium';
134
+ case 'small':
135
+ return 'button-small';
136
+ default:
137
+ return 'button-medium';
138
+ }
139
+ };
140
+
128
141
  const getIconColor = () => {
129
142
  if (iconColor) return iconColor;
130
143
  if (disabled) return styles.labelDisabled.color;
@@ -168,7 +181,7 @@ const Button = ({
168
181
  iconPosition === 'both') &&
169
182
  renderIcon()
170
183
  }
171
- <SEText bold campuni style={getLabelStyle()}>{label}</SEText>
184
+ <SEText type={getSETextType()} bold campuni style={getLabelStyle()}>{label}</SEText>
172
185
  {(
173
186
  iconPosition === 'right' ||
174
187
  iconPosition === 'both') &&
@@ -260,7 +273,7 @@ const styles = StyleSheet.create({
260
273
  },
261
274
  label: {
262
275
 
263
- fontSize: 14,
276
+ fontSize: 16,
264
277
  // fontWeight: '500',
265
278
  color: '#E7F79E',
266
279
  },
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/Button/index.jsx"],"names":[],"mappings":";AAKA;;;;;;;;;;;sBAgLC;kBArLwC,OAAO"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/Button/index.jsx"],"names":[],"mappings":";AAKA;;;;;;;;;;;sBA6LC;kBAlMwC,OAAO"}
@@ -1,5 +1,5 @@
1
1
  import React, { useMemo, useState } from 'react';
2
- import { TouchableOpacity, Text, StyleSheet, View } from 'react-native';
2
+ import { TouchableOpacity, StyleSheet, View } from 'react-native';
3
3
  import SEIcon from '~/superApp/UI/SEIcon';
4
4
  import { SEText } from '~/UI';
5
5
  const Button = ({ label, size = 'medium', variant = 'filled', disabled = false, inverseStyle = false, onPress, iconName, iconPosition = 'both', expand = false, iconColor, }) => {
@@ -101,6 +101,18 @@ const Button = ({ label, size = 'medium', variant = 'filled', disabled = false,
101
101
  return 20;
102
102
  }
103
103
  };
104
+ const getSETextType = () => {
105
+ switch (size) {
106
+ case 'large':
107
+ return 'button-large';
108
+ case 'medium':
109
+ return 'button-medium';
110
+ case 'small':
111
+ return 'button-small';
112
+ default:
113
+ return 'button-medium';
114
+ }
115
+ };
104
116
  const getIconColor = () => {
105
117
  if (iconColor)
106
118
  return iconColor;
@@ -127,7 +139,7 @@ const Button = ({ label, size = 'medium', variant = 'filled', disabled = false,
127
139
  {(iconPosition === 'left' ||
128
140
  iconPosition === 'both') &&
129
141
  renderIcon()}
130
- <SEText bold campuni style={getLabelStyle()}>{label}</SEText>
142
+ <SEText type={getSETextType()} bold campuni style={getLabelStyle()}>{label}</SEText>
131
143
  {(iconPosition === 'right' ||
132
144
  iconPosition === 'both') &&
133
145
  renderIcon()}
@@ -212,7 +224,7 @@ const styles = StyleSheet.create({
212
224
  aspectRatio: 1,
213
225
  },
214
226
  label: {
215
- fontSize: 14,
227
+ fontSize: 16,
216
228
  // fontWeight: '500',
217
229
  color: '#E7F79E',
218
230
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vpt-sebraeds",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "description": "Biblioteca de componentes React Native do Sebrae",
5
5
  "main": "dist/src/index.js",
6
6
  "types": "dist/src/index.d.ts",