22
33import classNames from 'classnames' ;
44import React from 'react' ;
5- import { BackgroundColors } from '../../constants' ;
5+ import { BackgroundColors , PaddingStyleProps } from '../../constants' ;
66import { useStyleProps } from '../../hooks' ;
77import { SpiritFooterProps } from '../../types' ;
88import { PADDING_BOTTOM , PADDING_TOP } from './constants' ;
@@ -16,12 +16,15 @@ const defaultStyleProps: Partial<SpiritFooterProps> = {
1616
1717const Footer = ( props : SpiritFooterProps ) => {
1818 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+ } ) ;
2225
2326 return (
24- < footer { ...styleProps } { ...otherProps } className = { classNames ( classProps , styleProps . className ) } >
27+ < footer { ...otherProps } { ...styleProps } className = { classNames ( classProps , styleProps . className ) } >
2528 { children }
2629 </ footer >
2730 ) ;
0 commit comments