@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.
32 lines • 1.17 kB
JavaScript
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
import React from 'react';
import { Image, StyleSheet } from 'react-native';
import { useHMSLayoutConfig } from '../hooks-util';
import { TestIds } from '../utils/constants';
export const CompanyLogo = ({
style,
...restProps
}) => {
const logoSource = useHMSLayoutConfig(layoutConfig => {
var _layoutConfig$logo;
return layoutConfig === null || layoutConfig === void 0 || (_layoutConfig$logo = layoutConfig.logo) === null || _layoutConfig$logo === void 0 ? void 0 : _layoutConfig$logo.url;
});
if (!logoSource) {
return null;
}
return /*#__PURE__*/React.createElement(Image, _extends({
testID: TestIds.company_logo,
source: {
uri: logoSource
},
style: [styles.icon, style]
}, restProps));
};
const styles = StyleSheet.create({
icon: {
aspectRatio: 1,
height: 32,
resizeMode: 'contain'
}
});
//# sourceMappingURL=CompanyLogo.js.map