Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gaohuaxue-mobile-app
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
project
gaohuaxue-mobile-app
Commits
34a069c5
Commit
34a069c5
authored
Nov 24, 2022
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 添加swooshColor属性
parent
e47473b1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
2 deletions
+14
-2
index.tsx
src/components/Radio/index.tsx
+14
-2
No files found.
src/components/Radio/index.tsx
View file @
34a069c5
...
...
@@ -36,12 +36,24 @@ interface RadioProps {
* 是否选中的,一般用于单独使用时,默认 false
*/
checked
?:
boolean
;
/**
* 勾子颜色,默认 #FFFFFF
*/
swooshColor
?:
string
;
children
?:
React
.
ReactNode
;
}
const
Radio
=
(
props
:
RadioProps
)
=>
{
const
{
value
,
color
,
size
,
disabled
,
checked
,
children
}
=
props
;
const
{
value
,
color
,
size
,
disabled
,
checked
,
swooshColor
=
'#FFFFFF'
,
children
,
}
=
props
;
const
myStyle
=
useAppStyle
(
styles
);
const
appTheme
=
useTheme
()
as
ThemeStyle
;
...
...
@@ -102,7 +114,7 @@ const Radio = (props: RadioProps) => {
<
Icons
name=
"check"
size=
{
finalSize
!
-
4
}
color=
{
!
finalDisabled
?
'#FFFFFF'
:
'#c8c9cc'
}
color=
{
!
finalDisabled
?
swooshColor
:
'#c8c9cc'
}
style=
{
{
opacity
:
isCheck
?
1
:
0
,
}
}
...
...
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