@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.43 kB
JavaScript
import * as React from 'react';
import { useHMSRoomColorPalette, useHMSRoomStyleSheet } from '../hooks-util';
import { HMSBaseButton } from './HMSBaseButton';
export const HMSSecondaryButton = ({
title,
loading,
onPress,
testId,
style,
disabled,
leftComponent,
wrapWithGestureDetector
}) => {
const {
secondary_dim: secondaryDarkColor,
on_secondary_high: onSecondaryHighColor
} = useHMSRoomColorPalette();
const hmsRoomStyles = useHMSRoomStyleSheet((theme, typography) => ({
button: {
backgroundColor: theme.palette.secondary_default
},
disabledButton: {
backgroundColor: theme.palette.secondary_disabled
},
buttonText: {
color: theme.palette.on_secondary_high,
fontFamily: `${typography.font_family}-SemiBold`
},
disabledText: {
color: theme.palette.on_secondary_low
}
}));
return /*#__PURE__*/React.createElement(HMSBaseButton, {
testID: testId,
loaderColor: onSecondaryHighColor,
loading: loading,
onPress: onPress,
title: title,
underlayColor: secondaryDarkColor,
disabled: disabled,
leftComponent: leftComponent,
style: [hmsRoomStyles.button, disabled ? hmsRoomStyles.disabledButton : null, style],
textStyle: [hmsRoomStyles.buttonText, disabled ? hmsRoomStyles.disabledText : null],
wrapWithGestureDetector: wrapWithGestureDetector
});
};
//# sourceMappingURL=HMSSecondaryButton.js.map