UNPKG

@100mslive/react-native-room-kit

Version:

100ms Room Kit provides simple & easy to use UI components to build Live Streaming & Video Conferencing experiences in your apps.

47 lines 1.41 kB
import * as React from 'react'; import { useHMSRoomColorPalette, useHMSRoomStyleSheet } from '../hooks-util'; import { HMSBaseButton } from './HMSBaseButton'; export const HMSPrimaryButton = ({ title, loading, onPress, testId, style, disabled, leftComponent, wrapWithGestureDetector }) => { const { primary_dim: primaryDarkColor, on_primary_high: onPrimaryHighColor } = useHMSRoomColorPalette(); const hmsRoomStyles = useHMSRoomStyleSheet((theme, typography) => ({ button: { backgroundColor: theme.palette.primary_default }, disabledButton: { backgroundColor: theme.palette.primary_disabled }, buttonText: { color: theme.palette.on_primary_high, fontFamily: `${typography.font_family}-SemiBold` }, disabledText: { color: theme.palette.on_primary_low } })); return /*#__PURE__*/React.createElement(HMSBaseButton, { testID: testId, loaderColor: onPrimaryHighColor, loading: loading, onPress: onPress, title: title, underlayColor: primaryDarkColor, disabled: disabled, leftComponent: leftComponent, style: [hmsRoomStyles.button, disabled ? hmsRoomStyles.disabledButton : null, style], textStyle: [hmsRoomStyles.buttonText, disabled ? hmsRoomStyles.disabledText : null], wrapWithGestureDetector: wrapWithGestureDetector }); }; //# sourceMappingURL=HMSPrimaryButton.js.map