@fruits-chain/react-native-xiaoshu
Version:
🌈 React Native UI library
46 lines (45 loc) • 1.08 kB
JavaScript
import React, { useMemo, memo } from 'react';
import { View } from 'react-native';
import DescriptionContext from "./context.js";
import { jsx as _jsx } from "react/jsx-runtime";
const DescriptionGroup = ({
colon = true,
contentStyle,
contentTextStyle,
labelStyle,
labelTextStyle,
labelWidth,
layout = 'horizontal',
size = 'm',
numberOfLines,
justify,
align,
empty = '--',
showEmpty = false,
...restProps
}) => {
const value = useMemo(() => ({
colon,
contentStyle,
contentTextStyle,
labelStyle,
labelTextStyle,
labelWidth,
layout,
size,
numberOfLines,
justify,
align,
empty,
showEmpty
}), [colon, contentStyle, contentTextStyle, labelStyle, labelTextStyle, labelWidth, layout, size, numberOfLines, justify, align, empty, showEmpty]);
return /*#__PURE__*/_jsx(DescriptionContext.Provider, {
value: value,
children: /*#__PURE__*/_jsx(View, {
...restProps
})
});
};
export default /*#__PURE__*/memo(DescriptionGroup);
//# sourceMappingURL=description-group.js.map
;