react-native-boxes 1.4.5 → 1.4.6

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/Button.tsx +3 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-boxes",
3
- "version": "1.4.5",
3
+ "version": "1.4.6",
4
4
  "description": "A react native library for rapid development of UI using boxes",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
package/src/Button.tsx CHANGED
@@ -258,7 +258,8 @@ export function LoadingButton(props: TextProps & TouchableHighlightProps
258
258
  loading: boolean,
259
259
  icon?: any,
260
260
  text?: string,
261
- loaderStyle?: 'normal' | 'transparent'
261
+ loaderStyle?: 'normal' | 'transparent',
262
+ underlayColor?: string
262
263
  }) {
263
264
  const theme = useContext(ThemeContext)
264
265
  const [_loading, _setIsLoading] = useState(props.loading)
@@ -270,7 +271,7 @@ export function LoadingButton(props: TextProps & TouchableHighlightProps
270
271
  let loaderColor = theme.colors.invert.text
271
272
  let loaderSize = theme.dimens.icon.md
272
273
  let btnBg = theme.colors.accent
273
- let btnBgPressed = theme.colors.accentLight
274
+ let btnBgPressed = props.underlayColor || theme.colors.accentLight
274
275
 
275
276
  if (_loading && props.loaderStyle == 'transparent') {
276
277
  loaderColor = theme.colors.accent