2
2
3
3
import classNames from 'classnames' ;
4
4
import React from 'react' ;
5
- import { BackgroundColors } from '../../constants' ;
5
+ import { BackgroundColors , PaddingStyleProps } from '../../constants' ;
6
6
import { useStyleProps } from '../../hooks' ;
7
7
import { SpiritFooterProps } from '../../types' ;
8
8
import { PADDING_BOTTOM , PADDING_TOP } from './constants' ;
@@ -16,12 +16,15 @@ const defaultStyleProps: Partial<SpiritFooterProps> = {
16
16
17
17
const Footer = ( props : SpiritFooterProps ) => {
18
18
const propsWithDefaults = { ...defaultStyleProps , ...props } ;
19
- const { children, backgroundColor, paddingBottom, paddingTop, ...restProps } = propsWithDefaults ;
20
- const { classProps } = useFooterStyleProps ( { backgroundColor, paddingBottom, paddingTop } ) ;
21
- const { styleProps, props : otherProps } = useStyleProps ( restProps ) ;
19
+ const { children, backgroundColor, ...restProps } = propsWithDefaults ;
20
+ const { classProps } = useFooterStyleProps ( { backgroundColor } ) ;
21
+ const { styleProps, props : otherProps } = useStyleProps ( restProps , {
22
+ paddingBottom : PaddingStyleProps . paddingBottom ,
23
+ paddingTop : PaddingStyleProps . paddingTop ,
24
+ } ) ;
22
25
23
26
return (
24
- < footer { ...styleProps } { ...otherProps } className = { classNames ( classProps , styleProps . className ) } >
27
+ < footer { ...otherProps } { ...styleProps } className = { classNames ( classProps , styleProps . className ) } >
25
28
{ children }
26
29
</ footer >
27
30
) ;
0 commit comments