@platformbuilders/react-native-ui
Version:
Platform Builders Shared Components Library
11 lines • 971 B
JavaScript
import React from 'react';
import { Touchable, ButtonWrapper, TextButton, Loading } from './styles';
const Button = ({ id, children, onPress, accessibility, accessibilityLabel, testID, style = [{}], textStyle = {}, disabled = false, rounded = false, loading = false, contrast = false, variant = 'primary', }) => {
return (React.createElement(Touchable, { id: id, accessibility: accessibility, accessibilityLabel: accessibilityLabel || accessibility, testID: testID || id, disabled: loading || disabled, onPress: onPress, rounded: rounded },
React.createElement(ButtonWrapper, { variant: variant, style: style, disabled: disabled, rounded: rounded },
loading && React.createElement(Loading, { contrast: contrast }),
!loading && (React.createElement(React.Fragment, null,
React.createElement(TextButton, { style: textStyle, disabled: disabled }, children))))));
};
export default Button;
//# sourceMappingURL=index.js.map