Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
bkunyun
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sunyihao
bkunyun
Commits
8fe2cc5a
Commit
8fe2cc5a
authored
Jun 17, 2022
by
rocosen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feat-permissions' into 'release'
Update Button.tsx See merge request
!53
parents
9cec3b3e
834f43ea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
15 deletions
+15
-15
Button.tsx
src/components/mui/Button.tsx
+15
-15
No files found.
src/components/mui/Button.tsx
View file @
8fe2cc5a
...
...
@@ -6,24 +6,24 @@ import { Typography, Menu, MenuItem, IconButton, Button } from "@mui/material";
import
ArrowDropDownIcon
from
'@mui/icons-material/ArrowDropDown'
;
type
ButtonTagProps
=
{
text
:
string
;
variant
?:
"text"
|
'contained'
|
'outlined'
;
click
?:
any
;
select
?:
any
[];
fontSize
?:
string
;
dropValue
?:
boolean
;
drop
?:
boolean
;
color
?:
"inherit"
|
"primary"
|
"secondary"
|
undefined
,
btnStyle
?:
any
,
size
?:
"large"
|
"medium"
|
"small"
,
disabled
?:
boolean
,
style
?:
any
,
img
?:
JSX
.
Element
;
selectCallBack
?:
(
item
:
any
,
key
:
number
)
=>
void
text
:
string
;
//文本内容
variant
?:
"text"
|
'contained'
|
'outlined'
;
//按钮样式
click
?:
any
;
//点击事件
select
?:
any
[];
//选择按钮的下拉列表
fontSize
?:
string
;
//按钮文字大小
dropValue
?:
boolean
;
//选择的值
drop
?:
boolean
;
//是否开启选择
color
?:
"inherit"
|
"primary"
|
"secondary"
|
undefined
,
//按钮颜色风格
btnStyle
?:
any
,
//按钮自定义样式类
size
?:
"large"
|
"medium"
|
"small"
,
//按钮尺寸
disabled
?:
boolean
,
//是否禁用
style
?:
any
,
//按钮自定义样式
img
?:
JSX
.
Element
;
//图标按钮中的图标
selectCallBack
?:
(
item
:
any
,
key
:
number
)
=>
void
//选择按钮的回调
}
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
[
anchorEl
,
setAnchorEl
]
=
React
.
useState
(
null
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment