diff --git a/packages/web-react/src/components/Footer/Footer.tsx b/packages/web-react/src/components/Footer/Footer.tsx index 8a2555b560..83bb395649 100644 --- a/packages/web-react/src/components/Footer/Footer.tsx +++ b/packages/web-react/src/components/Footer/Footer.tsx @@ -2,16 +2,25 @@ import classNames from 'classnames'; import React from 'react'; +import { BackgroundColors } from '../../constants'; import { useStyleProps } from '../../hooks'; import { SpiritFooterProps } from '../../types'; +import { useFooterStyleProps } from './useFooterStyleProps'; -const Footer = (props: SpiritFooterProps): JSX.Element => { - const { children, ...restProps } = props; +const defaultStyleProps: Partial = { + backgroundColor: BackgroundColors.SECONDARY, + paddingBottom: 'space-1200', + paddingTop: 'space-1400', +}; + +const Footer = (props: SpiritFooterProps) => { + const propsWithDefaults = { ...defaultStyleProps, ...props }; + const { children, backgroundColor, paddingBottom, paddingTop, ...restProps } = propsWithDefaults; + const { classProps } = useFooterStyleProps({ backgroundColor, paddingBottom, paddingTop }); const { styleProps, props: otherProps } = useStyleProps(restProps); - const footerClasses = 'bg-secondary pt-1400 pb-1200'; return ( -