@huds0n/components
Version:
Enhanced React Native components
23 lines (22 loc) • 832 B
JSX
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Separator = void 0;
const tslib_1 = require("tslib");
const react_1 = (0, tslib_1.__importDefault)(require("react"));
const react_native_1 = require("react-native");
const theme_1 = require("@huds0n/theming/src/theme");
function Separator(props) {
const { flex, height, width } = props;
if (flex) {
return (<react_native_1.View style={{
height,
width,
flex: flex === true ? 1 : flex,
}}/>);
}
return (<react_native_1.View style={{
height: height !== null && height !== void 0 ? height : theme_1.theme.spacings.M,
width: width !== null && width !== void 0 ? width : theme_1.theme.spacings.M,
}}/>);
}
exports.Separator = Separator;