✨ feat(登录页面): 已完成登陆页面UI
This commit is contained in:
@@ -3,9 +3,10 @@
|
||||
flex-flow: column nowrap;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: $color_font_one;
|
||||
&-name{
|
||||
font-size: 26px;
|
||||
color: #333;
|
||||
color: currentColor;
|
||||
margin-top: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,8 @@ import { FC, ReactNode } from "react"
|
||||
import IconFont from "../iconfont"
|
||||
import styles from './index.module.scss'
|
||||
|
||||
import classname from 'classnames'
|
||||
|
||||
type IconfontName = Parameters<typeof IconFont>['0']['name']
|
||||
|
||||
interface PropsType {
|
||||
@@ -10,15 +12,17 @@ interface PropsType {
|
||||
title: string
|
||||
children?: ReactNode
|
||||
onClick?: Function
|
||||
customClass?: string
|
||||
iconSize?: number
|
||||
}
|
||||
const IconCard: FC<PropsType> = (props) => {
|
||||
const { iconName, title, onClick } = props
|
||||
const { iconName, title, onClick, customClass = '', iconSize=72 } = props
|
||||
const handleClick = (event) => {
|
||||
onClick && onClick(event)
|
||||
}
|
||||
return (
|
||||
<View className={styles.iconCard} onClick={handleClick}>
|
||||
<IconFont name={iconName} size={72}></IconFont>
|
||||
<View className={classname(styles.iconCard, customClass)} onClick={handleClick}>
|
||||
<IconFont name={iconName} size={iconSize}></IconFont>
|
||||
<View className={styles['iconCard-name']}>{title}</View>
|
||||
</View>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user