@@ -113,16 +113,21 @@ const Item = styled.div<{
113113 $border ?: string ;
114114 $hoverBorder ?: string ;
115115 $activeBorder ?: string ;
116+ $borderWidth ?: string ;
116117 $radius ?: string ;
117118 $disabled ?: boolean ;
118119} > `
119120 line-height: 30px;
120121 padding: ${ ( props ) => props . $padding || '0 16px' } ;
121122 color: ${ ( props ) => props . $disabled ? `${ props . $color } 80` : ( props . $active ? props . $activeColor : props . $color ) } ;
122123 background-color: ${ ( props ) => ( props . $active ? ( props . $activeBg || 'transparent' ) : ( props . $bg || 'transparent' ) ) } ;
123- border: ${ ( props ) => props . $active
124- ? ( props . $activeBorder ? `1px solid ${ props . $activeBorder } ` : ( props . $border ? `1px solid ${ props . $border } ` : '1px solid transparent' ) )
125- : ( props . $border ? `1px solid ${ props . $border } ` : '1px solid transparent' ) } ;
124+ border: ${ ( props ) => {
125+ const width = props . $borderWidth || '1px' ;
126+ if ( props . $active ) {
127+ return props . $activeBorder ? `${ width } solid ${ props . $activeBorder } ` : ( props . $border ? `${ width } solid ${ props . $border } ` : `${ width } solid transparent` ) ;
128+ }
129+ return props . $border ? `${ width } solid ${ props . $border } ` : `${ width } solid transparent` ;
130+ } } ;
126131 border-radius: ${ ( props ) => props . $radius || '0px' } ;
127132 font-weight: ${ ( props ) => props . $active
128133 ? ( props . $activeTextWeight || props . $textWeight || 500 )
@@ -144,7 +149,13 @@ const Item = styled.div<{
144149 &:hover {
145150 color: ${ ( props ) => props . $disabled ? ( props . $active ? props . $activeColor : props . $color ) : ( props . $hoverColor || props . $activeColor ) } ;
146151 background-color: ${ ( props ) => props . $disabled ? ( props . $active ? ( props . $activeBg || 'transparent' ) : ( props . $bg || 'transparent' ) ) : ( props . $hoverBg || props . $activeBg || props . $bg || 'transparent' ) } ;
147- border: ${ ( props ) => props . $hoverBorder ? `1px solid ${ props . $hoverBorder } ` : ( props . $activeBorder ? `1px solid ${ props . $activeBorder } ` : ( props . $border ? `1px solid ${ props . $border } ` : '1px solid transparent' ) ) } ;
152+ border: ${ ( props ) => {
153+ const width = props . $borderWidth || '1px' ;
154+ if ( props . $hoverBorder ) return `${ width } solid ${ props . $hoverBorder } ` ;
155+ if ( props . $activeBorder ) return `${ width } solid ${ props . $activeBorder } ` ;
156+ if ( props . $border ) return `${ width } solid ${ props . $border } ` ;
157+ return `${ width } solid transparent` ;
158+ } } ;
148159 cursor: ${ ( props ) => props . $disabled ? 'not-allowed' : 'pointer' } ;
149160 font-weight: ${ ( props ) => props . $disabled ? undefined : ( props . $hoverTextWeight || props . $textWeight || 500 ) } ;
150161 font-family: ${ ( props ) => props . $disabled ? undefined : ( props . $hoverFontFamily || props . $fontFamily || 'sans-serif' ) } ;
@@ -212,7 +223,6 @@ const StyledMenu = styled(Menu) <
212223 color: ${ ( p ) => p . $color } ;
213224 background-color: ${ ( p ) => p . $bg || "transparent" } ;
214225 border-radius: ${ ( p ) => p . $radius || "0px" } ;
215- border: ${ ( p ) => p . $border ? `1px solid ${ p . $border } ` : "1px solid transparent" } ;
216226 font-weight: ${ ( p ) => p . $textWeight || 500 } ;
217227 font-family: ${ ( p ) => p . $fontFamily || "sans-serif" } ;
218228 font-style: ${ ( p ) => p . $fontStyle || "normal" } ;
@@ -226,7 +236,6 @@ const StyledMenu = styled(Menu) <
226236 .ant-dropdown-menu-item:hover {
227237 color: ${ ( p ) => p . $hoverColor || p . $color } ;
228238 background-color: ${ ( p ) => p . $hoverBg || p . $bg || "transparent" } !important;
229- border: ${ ( p ) => p . $hoverBorder ? `1px solid ${ p . $hoverBorder } ` : ( p . $border ? `1px solid ${ p . $border } ` : "1px solid transparent" ) } ;
230239 font-weight: ${ ( p ) => p . $hoverTextWeight || p . $textWeight || 500 } ;
231240 font-family: ${ ( p ) => p . $hoverFontFamily || p . $fontFamily || "sans-serif" } ;
232241 font-style: ${ ( p ) => p . $hoverFontStyle || p . $fontStyle || "normal" } ;
@@ -239,7 +248,6 @@ const StyledMenu = styled(Menu) <
239248 .ant-menu-item-selected {
240249 color: ${ ( p ) => p . $activeColor } ;
241250 background-color: ${ ( p ) => p . $activeBg || p . $bg || "transparent" } ;
242- border: ${ ( p ) => p . $activeBorder ? `1px solid ${ p . $activeBorder } ` : ( p . $border ? `1px solid ${ p . $border } ` : "1px solid transparent" ) } ;
243251 font-weight: ${ ( p ) => p . $activeTextWeight || p . $textWeight || 500 } ;
244252 font-family: ${ ( p ) => p . $activeFontFamily || p . $fontFamily || "sans-serif" } ;
245253 font-style: ${ ( p ) => p . $activeFontStyle || p . $fontStyle || "normal" } ;
@@ -608,6 +616,7 @@ const NavCompBase = new UICompBuilder(childrenMap, (props) => {
608616 $hoverBorder = { props . navItemHoverStyle ?. border }
609617 $activeBorder = { props . navItemActiveStyle ?. border }
610618 $radius = { props . navItemStyle ?. radius }
619+ $borderWidth = { props . navItemStyle ?. borderWidth }
611620 $disabled = { disabled }
612621 onClick = { ( ) => { if ( ! disabled && onEvent ) onEvent ( "click" ) ; } }
613622 >
0 commit comments