From c3a67c2fa1447fff0ba18cdde9ffa36f1496ee55 Mon Sep 17 00:00:00 2001 From: MateusLopes Date: Sun, 8 Jan 2023 12:08:13 -0300 Subject: [PATCH] feat: add funcionalidade abre e fecha no footer --- src/components/footer/FooterMenu.tsx | 35 ++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/components/footer/FooterMenu.tsx diff --git a/src/components/footer/FooterMenu.tsx b/src/components/footer/FooterMenu.tsx new file mode 100644 index 0000000..8c83a42 --- /dev/null +++ b/src/components/footer/FooterMenu.tsx @@ -0,0 +1,35 @@ +import React, { useState } from 'react' + +interface IFooterMenuProps{ + title: string; + content1: string; + content2: string; + content3: string; + content4: string; +} + +const FooterMenu = (props: IFooterMenuProps) => { + const [isActive, setIsActive] = useState(false) + + return ( +
+
setIsActive(!isActive)} + > +
{props.title}
+
{isActive ? '-' : '+'}
+
+ {isActive && ( + <> +
  • {props.content1}
  • +
  • {props.content2}
  • +
  • {props.content3}
  • +
  • {props.content4}
  • + + )} +
    + ) +} + +export default FooterMenu