@@ -26,36 +26,38 @@ type IProps = DividerProps & {
2626
2727// TODO: enable type "vertical" https://ant.design/components/divider
2828
29- const StyledDivider = styled ( Divider ) < IProps > `
29+ const StyledDivider = styled ( Divider ) < IProps > `
3030 margin-top: 3.5px;
31- rotate:${ props => props . $style . rotation } ;
31+ rotate: ${ ( props ) => props . $style . rotation } ;
32+
3233 .ant-divider-inner-text {
3334 height: 32px;
3435 display: flex;
3536 align-items: center;
3637 font-size: ${ ( props ) => props . $style . textSize } ;
3738 font-weight: ${ ( props ) => props . $style . textWeight } ;
3839 font-family: ${ ( props ) => props . $style . fontFamily } ;
39- text-transform:${ ( props ) => props . $style . textTransform } ;
40- text-decoration: ${ ( props ) => props . $style . textDecoration } ;
41- font-style:${ ( props ) => props . $style . fontStyle }
40+ text-transform: ${ ( props ) => props . $style . textTransform } ;
41+ ${ ( props ) => props . $style . textDecoration !== undefined ? `text-decoration: ${ props . $style . textDecoration } ;` : '' }
42+ font-style: ${ ( props ) => props . $style . fontStyle } ;
4243 }
43- ${ props => props . $animationStyle }
44+
45+ ${ ( props ) => props . $animationStyle }
4446 min-width: 1px;
45- width: ${ ( props ) => {
46- return widthCalculator ( props . $style . margin ) ;
47- } } ;
48- min-height: ${ ( props ) => {
49- return heightCalculator ( props . $style . margin ) ;
50- } } ;
51- margin: ${ ( props ) => {
52- return props . $style . margin ;
53- } } ;
47+ width: ${ ( props ) => widthCalculator ( props . $style . margin ) } ;
48+ min-height: ${ ( props ) => heightCalculator ( props . $style . margin ) } ;
49+ margin: ${ ( props ) => props . $style . margin } ;
5450 padding: ${ ( props ) => props . $style . padding } ;
55- border-radius:${ props => props . $style . radius } ;
56- border-top: ${ ( props ) => ( props . $style . borderWidth && props . $style . borderWidth != "0px" ? props . $style . borderWidth : "1px" ) } ${ ( props ) => props . $style . borderStyle } ${ ( props ) => props . $style . border } ;
57- .ant-divider-inner-text::before, .ant-divider-inner-text::after {
58- border-block-start: ${ ( props ) => ( props . $style . borderWidth && props . $style . borderWidth != "0px" ? props . $style . borderWidth : "1px" ) } ${ ( props ) => ( props . dashed ? "dashed" : "solid" ) } ${ ( props ) => props . $style . border } !important;
51+ border-radius: ${ ( props ) => props . $style . radius } ;
52+ border-top: ${ ( props ) => props . $style . borderWidth && props . $style . borderWidth !== "0px" ? props . $style . borderWidth : "1px" }
53+ ${ ( props ) => props . $style . borderStyle }
54+ ${ ( props ) => props . $style . border } ;
55+
56+ .ant-divider-inner-text::before,
57+ .ant-divider-inner-text::after {
58+ border-block-start: ${ ( props ) => props . $style . borderWidth && props . $style . borderWidth !== "0px" ? props . $style . borderWidth : "1px" }
59+ ${ ( props ) => props . dashed ? "dashed" : "solid" }
60+ ${ ( props ) => props . $style . border } !important;
5961 border-block-start-color: inherit;
6062 border-block-end: 0;
6163 border-block-start-radius: inherit;
@@ -66,11 +68,14 @@ const StyledDivider = styled(Divider) <IProps>`
6668 border-top-color: ${ ( props ) => props . $style . color } ;
6769 color: ${ ( props ) => props . $style . text } ;
6870 }
71+
6972 &.ant-divider-horizontal.ant-divider-with-text::before,
70- &.ant-divider-horizontal.ant-divider-with-text::after {
73+ &.ant-divider-horizontal.ant-divider-with-text::after {
7174 border-top-color: ${ ( props ) => props . $style . color } ;
72- border-radius:${ props => props . $style . radius } ;
73- border-top: ${ ( props ) => ( props . $style . borderWidth && props . $style . borderWidth != "0px" ? props . $style . borderWidth : "1px" ) } ${ ( props ) => props . $style . borderStyle } ${ ( props ) => props . $style . border } ;
75+ border-radius: ${ ( props ) => props . $style . radius } ;
76+ border-top: ${ ( props ) => props . $style . borderWidth && props . $style . borderWidth !== "0px" ? props . $style . borderWidth : "1px" }
77+ ${ ( props ) => props . $style . borderStyle }
78+ ${ ( props ) => props . $style . border } ;
7479 }
7580` ;
7681
0 commit comments