✨ feat(购物界面): 完成购物界面50%
This commit is contained in:
@@ -37,6 +37,12 @@
|
||||
color: $color_warning;
|
||||
$current_color: $color_warning;
|
||||
}
|
||||
&--info {
|
||||
border: 1px solid $color_info;
|
||||
color: $color_info;
|
||||
$current_color: $color_info;
|
||||
|
||||
}
|
||||
&--round {
|
||||
border-radius: 50px;
|
||||
}
|
||||
@@ -66,4 +72,8 @@
|
||||
background-color: rgba($color: $color_warning, $alpha: 0.5);
|
||||
color: #fff;
|
||||
}
|
||||
&--info:active {
|
||||
background-color: rgba($color: $color_info, $alpha: 0.5);
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,16 +3,16 @@ import { FC, ReactNode } from 'react'
|
||||
import classnames from 'classnames'
|
||||
import styles from './index.module.scss'
|
||||
|
||||
type ButtonType = 'primary' | 'danger' | 'warning'
|
||||
type ButtonType = 'primary' | 'danger' | 'warning' | 'info'
|
||||
type ButtonSize = 'normal' | 'small'
|
||||
|
||||
interface PropsType {
|
||||
size?: ButtonSize
|
||||
type?: ButtonType
|
||||
round?: boolean
|
||||
round?: boolean // 大圆角
|
||||
disabled?: boolean
|
||||
plain?: boolean
|
||||
circle?: boolean
|
||||
plain?: boolean // 填满背景颜色
|
||||
circle?: boolean // 小圆角
|
||||
children?: ReactNode
|
||||
onClick?: Function
|
||||
customClassName?: string
|
||||
@@ -51,8 +51,9 @@ const NormalButton: FC<PropsType> = (props) => {
|
||||
onClick && onClick(event)
|
||||
}
|
||||
|
||||
|
||||
return (
|
||||
<View className={classnames(styles['button'], getClassName(), customStyles, customClassName)} onClick={handleClick}>
|
||||
<View className={classnames(styles['button'], getClassName(), customClassName)} style={customStyles} onClick={handleClick}>
|
||||
<Text className={styles['button--text']}>{children}</Text>
|
||||
</View>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user