✨ feat(购物界面): 完成购物界面50%
This commit is contained in:
@@ -11,11 +11,11 @@ interface PropsType {
|
||||
circle?: boolean
|
||||
children?: ReactNode
|
||||
customStyle?: React.CSSProperties
|
||||
|
||||
customClassName?: string
|
||||
}
|
||||
|
||||
const LayoutBlock: FC<PropsType> = (props) => {
|
||||
const { flexDirection = 'col', circle = false, children } = props
|
||||
const { flexDirection = 'col', circle = false, children, customStyle = {}, customClassName='' } = props
|
||||
|
||||
const getClassName = () => {
|
||||
const classObject = {
|
||||
@@ -25,10 +25,10 @@ const LayoutBlock: FC<PropsType> = (props) => {
|
||||
return classObject
|
||||
}
|
||||
|
||||
return <View className={classnames(styles.layoutBlock, getClassName())}>
|
||||
|
||||
{children}
|
||||
|
||||
</View>
|
||||
return (
|
||||
<View className={classnames(styles.layoutBlock, getClassName(), customClassName)} style={customStyle}>
|
||||
{children}
|
||||
</View>
|
||||
)
|
||||
}
|
||||
export default LayoutBlock
|
||||
|
||||
Reference in New Issue
Block a user