✨ feat(登录页面): 已完成登陆页面UI

This commit is contained in:
xuan
2022-09-13 14:24:57 +08:00
parent 677ea68f27
commit a07ca24140
27 changed files with 42704 additions and 131 deletions
+2 -1
View File
@@ -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;
}
}
+7 -3
View File
@@ -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>
)