@@ -4,7 +4,7 @@ import { getMasterCardBackground } from "./mixins/background"
44import { MasterCardContainer } from "./styled"
55
66const minWidths = {
7- default : "29px " ,
7+ default : "22px " ,
88 large : "37px" ,
99}
1010
@@ -21,6 +21,7 @@ const MasterCard = forwardRef(
2121 pillEnd,
2222 round,
2323 size,
24+ zIndex,
2425 ...rest
2526 } ,
2627 ref
@@ -37,35 +38,37 @@ const MasterCard = forwardRef(
3738
3839 const pillLeftProps = {
3940 background : getMasterCardBackground ( pillLeft . background , pillLeft . flavour || "disabledError" ) ,
40- padding : [ 1 , 3 ] ,
41+ padding : [ 0 , 3 ] ,
4142 position : "relative" ,
4243 width : { min : minWidths [ rest . size ] || minWidths . default } ,
4344 ...pillProps ,
4445 ...pillLeft ,
46+ round : "12px" ,
47+ zIndex : 3 ,
4548 }
4649 const pillRightProps = {
4750 background : pillRightBackground ,
48- margin : [ 0 , 0 , 0 , - 1 ] ,
49- padding : [ 1 , 2 ] ,
51+ margin : [ 0 , 0 , 0 , - 1.5 ] ,
52+ padding : [ 0 , 2 ] ,
53+ width : { min : minWidths [ rest . size ] || minWidths . default } ,
5054 ...pillProps ,
5155 ...pillRight ,
56+ round : "0 12px 12px 0" ,
57+ zIndex : 2 ,
5258 }
5359 const pillEndProps = pillEnd && {
5460 background : pillEndBackground ,
55- margin : [ 0 , 0 , 0 , - 1 ] ,
56- padding : [ 1 , 2 ] ,
61+ margin : [ 0 , 0 , 0 , - 1.5 ] ,
62+ padding : [ 0 , 2 ] ,
63+ width : { min : minWidths [ rest . size ] || minWidths . default } ,
5764 ...pillProps ,
5865 ...pillEnd ,
66+ round : "0 12px 12px 0" ,
67+ zIndex : 1 ,
5968 }
6069
6170 return (
62- < MasterCardContainer
63- background = { pillEndBackground || pillRightBackground }
64- data-testid = { testId }
65- onClick = { onClick }
66- ref = { ref }
67- { ...commonProps }
68- >
71+ < MasterCardContainer data-testid = { testId } onClick = { onClick } ref = { ref } { ...commonProps } >
6972 { children || (
7073 < >
7174 < MasterCardPill data-testid = { `${ testId } -left-pill` } { ...pillLeftProps } />
0 commit comments