From ee862e6e64b7640224105f8ba65737fe0af1494e Mon Sep 17 00:00:00 2001 From: Joshua Graber <68428039+joshuagraber@users.noreply.github.com> Date: Fri, 6 Dec 2024 16:01:01 -0500 Subject: [PATCH] refactor: update footer to v2 design (#129) resolve #128 --- src/components/Footer/PdapFooter.vue | 256 +++++++++--------- src/components/Footer/README.md | 65 ++++- .../Footer/__snapshots__/footer.spec.ts.snap | 103 ++++--- src/components/Footer/constants.ts | 11 + src/components/Footer/footer.spec.ts | 187 ++++++++++--- src/components/Footer/index.ts | 1 + src/components/Footer/types.ts | 11 +- src/demo/App.vue | 2 +- src/demo/pages/ComponentDemo.vue | 2 +- src/utils/format.ts | 5 + 10 files changed, 434 insertions(+), 209 deletions(-) create mode 100644 src/components/Footer/constants.ts create mode 100644 src/utils/format.ts diff --git a/src/components/Footer/PdapFooter.vue b/src/components/Footer/PdapFooter.vue index 715ca7f..52d3e8a 100644 --- a/src/components/Footer/PdapFooter.vue +++ b/src/components/Footer/PdapFooter.vue @@ -1,166 +1,174 @@ - - diff --git a/src/components/Footer/README.md b/src/components/Footer/README.md index fd5bb54..1f9b742 100644 --- a/src/components/Footer/README.md +++ b/src/components/Footer/README.md @@ -2,32 +2,49 @@ ## Props -| name | required? | types | description | default | -| --------------------- | --------- | -------- | ---------------------- | ----------------------------------------------------------- | -| `logoImageSrc` | no | `string` | Source of logo image | `'node_modules/pdap-design-system/dist/images/acronym.svg'` | -| `logoImageAnchorPath` | no | `string` | Flex alignment presets | `/` | +| name | required? | types | description | default | +| ----------------- | --------- | ---------------------------------- | ---------------------------- | ------- | +| `fundraisingData` | yes | `{ raised: string; goal: string }` | data from donor box campaign | | ## Notes The `Footer` component provides support for overriding the default social links. The `links` variable is `inject`ed by the component, using the following defaults: -``` +```vue export default { ... inject: { footerLinks: { default: [ { - to: 'https://github.com/orgs/Police-Data-Accessibility-Project', - text: 'Github', + href: 'https://github.com/orgs/Police-Data-Accessibility-Project', + text: 'Github', + icon: FOOTER_LINK_ICONS.GITHUB, + }, + { + href: 'https://discord.gg/wMqex8nKZJ', + text: 'Discord', + icon: FOOTER_LINK_ICONS.DISCORD, + }, + { + href: 'https://www.linkedin.com/company/pdap', + text: 'LinkedIn', + icon: FOOTER_LINK_ICONS.LINKEDIN, }, { - to: 'ttps://discord.gg/wMqex8nKZJ', - text: 'Discord', + href: 'https://pdap.io/jobs', + text: 'Jobs', + icon: FOOTER_LINK_ICONS.JOBS, }, { - to: 'https://www.linkedin.com/company/pdap', - text: 'LinkedIn', + href: 'https://newsletter.pdap.io/', + text: 'Newsletter', + icon: FOOTER_LINK_ICONS.NEWSLETTER, + }, + { + href: 'https://docs.pdap.io/', + text: 'Docs', + icon: FOOTER_LINK_ICONS.DOCS, }, ] } @@ -44,7 +61,7 @@ If we desire different links somewhere that `Footer` is rendered, simply `provid ## Example -``` +```vue