Commit 8fe2cc5a authored by rocosen's avatar rocosen

Merge branch 'feat-permissions' into 'release'

Update Button.tsx

See merge request sunyihao/bkunyun!53
parents 9cec3b3e 834f43ea
...@@ -6,24 +6,24 @@ import { Typography, Menu, MenuItem, IconButton, Button } from "@mui/material"; ...@@ -6,24 +6,24 @@ import { Typography, Menu, MenuItem, IconButton, Button } from "@mui/material";
import ArrowDropDownIcon from '@mui/icons-material/ArrowDropDown'; import ArrowDropDownIcon from '@mui/icons-material/ArrowDropDown';
type ButtonTagProps = { type ButtonTagProps = {
text: string; text: string;//文本内容
variant?: "text" | 'contained' | 'outlined'; variant?: "text" | 'contained' | 'outlined';//按钮样式
click?: any; click?: any;//点击事件
select?: any[]; select?: any[];//选择按钮的下拉列表
fontSize?: string; fontSize?: string;//按钮文字大小
dropValue?: boolean; dropValue?: boolean;//选择的值
drop?: boolean; drop?: boolean;//是否开启选择
color?: "inherit" | "primary" | "secondary" | undefined, color?: "inherit" | "primary" | "secondary" | undefined,//按钮颜色风格
btnStyle?: any, btnStyle?: any,//按钮自定义样式类
size?: "large" | "medium" | "small", size?: "large" | "medium" | "small",//按钮尺寸
disabled?: boolean, disabled?: boolean,//是否禁用
style?: any, style?: any,//按钮自定义样式
img?: JSX.Element; img?: JSX.Element;//图标按钮中的图标
selectCallBack?: (item: any, key: number) => void selectCallBack?: (item: any, key: number) => void//选择按钮的回调
} }
const ButtonComponent = (props: ButtonTagProps) => { const ButtonComponent = (props: ButtonTagProps) => {
const { size, disabled, variant, color, img, btnStyle = {},select, selectCallBack } = props; const { size, disabled, variant, color, img, btnStyle = {}, select, selectCallBack } = props;
const { classes, cx } = useStyles({}); const { classes, cx } = useStyles({});
const [anchorEl, setAnchorEl] = React.useState(null); const [anchorEl, setAnchorEl] = React.useState(null);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment