File tree Expand file tree Collapse file tree 4 files changed +20
-1
lines changed Expand file tree Collapse file tree 4 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -8,14 +8,24 @@ interface IFooterContent {
8
8
contentDirection ?: ContentDirectionType ;
9
9
forceVertical ?: boolean ;
10
10
children : React . ReactNode [ ] ;
11
+ margin ?: boolean ;
12
+ marginLeft ?: boolean ;
13
+ marginRight ?: boolean ;
11
14
}
12
15
13
16
export const FooterContent = ( props : IFooterContent ) : JSX . Element | null => {
14
17
// always returned something, cause we need to put container to flex direction
15
18
const flexDirectionDesktopTablet = props . forceVertical ? 'column' : 'row' ;
16
19
20
+ if ( ! props . children . length ) {
21
+ return null ;
22
+ }
23
+
17
24
return (
18
25
< FooterContentStyled
26
+ $margin = { props . margin }
27
+ $marginLeft = { props . marginLeft }
28
+ $marginRight = { props . marginRight }
19
29
aria-hidden = { ! props . children . length }
20
30
contentDirection = { props . contentDirection }
21
31
flexDirectionDesktopTablet = { flexDirectionDesktopTablet }
Original file line number Diff line number Diff line change @@ -10,6 +10,9 @@ type FooterStylesType = {
10
10
contentDirection ?: ContentDirectionType ;
11
11
flexDirectionDesktopTablet ?: string ;
12
12
alignItems ?: string ;
13
+ $margin ?: boolean ;
14
+ $marginLeft ?: boolean ;
15
+ $marginRight ?: boolean ;
13
16
} ;
14
17
15
18
type RootContainerStyledType = FooterStylesType & {
@@ -36,4 +39,7 @@ export const FooterContentStyled = styled.div<FooterStylesType>`
36
39
justify-content: ${ props =>
37
40
props . contentDirection === ContentDirectionType . HORIZONTAL ? 'flex-start' : 'center' } ;
38
41
${ props => getStyles ( props . styles ?. contentContainer ) }
42
+ margin: ${ props => props . $margin && 'auto' } ;
43
+ margin-left: ${ props => props . $marginLeft && 'auto' } ;
44
+ margin-right: ${ props => props . $marginRight && 'auto' } ;
39
45
` ;
Original file line number Diff line number Diff line change @@ -80,20 +80,23 @@ const FooterStandAloneComponent = (
80
80
< FooterContent
81
81
contentDirection = { props . contentDirection }
82
82
forceVertical = { props . forceVertical }
83
+ marginRight = { true }
83
84
styles = { props . styles }
84
85
>
85
86
{ firstContent }
86
87
</ FooterContent >
87
88
< FooterContent
88
89
contentDirection = { props . contentDirection }
89
90
forceVertical = { props . forceVertical }
91
+ margin = { true }
90
92
styles = { props . styles }
91
93
>
92
94
{ secondContent }
93
95
</ FooterContent >
94
96
< FooterContent
95
97
contentDirection = { props . contentDirection }
96
98
forceVertical = { props . forceVertical }
99
+ marginLeft = { true }
97
100
styles = { props . styles }
98
101
>
99
102
{ thridContent }
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ const defaultShadow = 'none';
15
15
export const useScrollEffect = (
16
16
conditional = true ,
17
17
shadowStyles = defaultShadow ,
18
- shadowVisible = 99
18
+ shadowVisible = 1
19
19
) : CustomHookReturnValue => {
20
20
// the scrollable element ref
21
21
const innerScrollableRef = useRef < HTMLElement | null > ( null ) ;
You can’t perform that action at this time.
0 commit comments