File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ export default function ComplexRadio(props) {
1818 titleStyle,
1919 type,
2020 borderRadiusSize,
21+ className,
2122 ...otherProps
2223 } = props ;
2324
@@ -35,6 +36,7 @@ export default function ComplexRadio(props) {
3536 [ `${ classSelector } -card-disabled` ] : type === 'card' && props . disabled ,
3637 [ `${ classSelector } -card-checked` ] : type === 'card' && props . checked ,
3738 [ `${ classSelector } -radius-${ borderRadiusSize } ` ] : true ,
39+ [ className ] : ! ! className ,
3840 } ) }
3941 { ...otherProps }
4042 >
Original file line number Diff line number Diff line change @@ -19,6 +19,8 @@ export default function ComplexRadioDemo() {
1919 < div style= {{ marginBottom: 50 }}>
2020 < h5> 标题+ 头像< / h5>
2121 < ComplexRadio
22+ radioClassName= " test1"
23+ className= " test2"
2224 titleStyle= {{ minWidth: ' fit-content' }}
2325 title= " 单选文字"
2426 imgSrc= " https://brand-guide.shuyun.com/IAM/52e939494f3b.png"
Original file line number Diff line number Diff line change @@ -25,9 +25,11 @@ export default function ComplexRadioDemo() {
2525 < div>
2626 < div>
2727 < h5> 基础卡片< / h5>
28- < Radio .Group value= {value} defaultValue= {" E" } onChange= {onChange} horizontal style= {{ flexWrap: ' wrap' }}>
28+ < Radio .Group value= {value} defaultValue= {" E" } onChange= {onChange} horizontal style= {{ flexWrap: ' wrap' }} className = " test " >
2929 {radioList .map ((item , index ) => (
3030 < ComplexRadio
31+ radioClassName= " test1"
32+ className= " test2"
3133 title= {item .label }
3234 value= {item .value }
3335 type= " card"
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ export default function ComplexRadioDemo() {
2525 < div style= {{ display: ' flex' , justifyContent: ' space-around' , flexWrap: " wrap" }}>
2626 < div>
2727 < h5> 标题+ 头像< / h5>
28- < Radio .Group vertical value= {value} defaultValue= {" E" } onChange= {onChange}>
28+ < Radio .Group vertical value= {value} defaultValue= {" E" } onChange= {onChange} className = " test " >
2929 {radioList .map ((item , index ) => (
3030 < ComplexRadio
3131 title= {item .label }
You can’t perform that action at this time.
0 commit comments