diff --git a/packages/web-react/src/components/Footer/Footer.tsx b/packages/web-react/src/components/Footer/Footer.tsx index 8a2555b560..3cc45a0ff0 100644 --- a/packages/web-react/src/components/Footer/Footer.tsx +++ b/packages/web-react/src/components/Footer/Footer.tsx @@ -2,16 +2,26 @@ import classNames from 'classnames'; import React from 'react'; +import { BackgroundColors } from '../../constants'; import { useStyleProps } from '../../hooks'; import { SpiritFooterProps } from '../../types'; +import { PADDING_BOTTOM, PADDING_TOP } from './constants'; +import { useFooterStyleProps } from './useFooterStyleProps'; -const Footer = (props: SpiritFooterProps): JSX.Element => { - const { children, ...restProps } = props; +const defaultStyleProps: Partial = { + backgroundColor: BackgroundColors.SECONDARY, + paddingBottom: PADDING_BOTTOM, + paddingTop: PADDING_TOP, +}; + +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 ( -