react-native-qrcode-mask
Version:
React Native QR Code Mask Library
38 lines (36 loc) • 866 B
JavaScript
/**
* Created by nghinv on Thu Jul 15 2021
* Copyright (c) 2021 nghinv@lumi.biz
*/
import React from 'react';
import { View, StyleSheet } from 'react-native';
function Edge(props) {
const {
edgeWidth,
edgeHeight,
edgeColor,
edgeBorderWidth,
type
} = props;
const [type1, type2] = type.split('_');
const edgeStyle = {
[type1.toLocaleLowerCase()]: 0,
[type2.toLocaleLowerCase()]: 0,
[`border${type1}Width`]: edgeBorderWidth,
[`border${type2}Width`]: edgeBorderWidth
};
return /*#__PURE__*/React.createElement(View, {
style: [styles.container, {
width: edgeWidth,
height: edgeHeight,
borderColor: edgeColor
}, edgeStyle]
});
}
const styles = StyleSheet.create({
container: {
position: 'absolute'
}
});
export default /*#__PURE__*/React.memo(Edge);
//# sourceMappingURL=Edge.js.map