diff --git a/public/images/faq.png b/public/images/faq.png new file mode 100644 index 00000000..397af491 Binary files /dev/null and b/public/images/faq.png differ diff --git a/src/components/breadcrumb/styles.ts b/src/components/breadcrumb/styles.ts index 95c755c7..58b9deed 100644 --- a/src/components/breadcrumb/styles.ts +++ b/src/components/breadcrumb/styles.ts @@ -5,6 +5,7 @@ const breadcrumb: SxStyleProp = { color: '#6b7785', mb: '24px', lineHeight: '18px', + flexWrap: 'wrap', } const breadcrumbItem: SxStyleProp = { diff --git a/src/components/faq-card/index.tsx b/src/components/faq-card/index.tsx new file mode 100644 index 00000000..22339f28 --- /dev/null +++ b/src/components/faq-card/index.tsx @@ -0,0 +1,34 @@ +import { Box, Text, Link } from '@vtex/brand-ui' + +import type { FaqCardDataElement } from 'utils/typings/types' + +import styles from './styles' +import Tag from 'components/tag' +import DateText from 'components/date-text' + +const FaqCard = ({ + title, + productTeam, + slug, + createdAt, + updatedAt, +}: FaqCardDataElement) => { + const createdAtDate = new Date(createdAt) + const updatedAtDate = new Date(updatedAt) + + return ( + + + + {productTeam} + + + {title} + + + + + ) +} + +export default FaqCard diff --git a/src/components/faq-card/styles.ts b/src/components/faq-card/styles.ts new file mode 100644 index 00000000..5cbcdc76 --- /dev/null +++ b/src/components/faq-card/styles.ts @@ -0,0 +1,43 @@ +import type { SxStyleProp } from '@vtex/brand-ui' + +const container: SxStyleProp = { + px: ['32px', '32px', '36px', '64px'], + py: '24px', + display: 'flex', + flexDirection: 'column', + gap: '16px', + borderRadius: '4px', + border: '1px solid #E7E9EE', + width: ['320px', '544px', '720px'], + transition: 'all 0.3s ease-out', + ':hover': { + cursor: 'pointer', + }, + ':active, :hover': { + boxShadow: '0px 0px 16px rgba(0, 0, 0, 0.1)', + transition: 'all 0.3 ease-out', + + '.title, .module': { + transition: 'all 0.3s ease-out', + color: '#000711', + }, + }, +} + +const title: SxStyleProp = { + fontSize: ['14px', '20px'], + fontWeight: '400', + lineHeight: ['22px', '30px'], + color: 'muted.0', +} + +const tag: SxStyleProp = { + width: 'max-content', + px: '8px', +} + +export default { + container, + title, + tag, +} diff --git a/src/components/filter/index.tsx b/src/components/filter/index.tsx index bef95dd3..08078918 100644 --- a/src/components/filter/index.tsx +++ b/src/components/filter/index.tsx @@ -13,8 +13,8 @@ interface Filter { } interface Props { - tagFilter: Filter - checkBoxFilter: Filter + tagFilter?: Filter + checkBoxFilter?: Filter onApply: (filters: { tag: string[]; checklist: string[] }) => void } @@ -69,7 +69,7 @@ const Filter = ({ tagFilter, checkBoxFilter, onApply }: Props) => { setIsModalOpen(true) }} > - + {intl.formatMessage({ id: 'filter_modal.title' })} {numberOfFilters > 0 && ( {numberOfFilters} @@ -78,6 +78,56 @@ const Filter = ({ tagFilter, checkBoxFilter, onApply }: Props) => { ) } + const TagFilter = () => { + if (!tagFilter) return <> + return ( + + {tagFilter.name} + + {tagFilter.options.map((option, index) => ( + handleFilterClick(option.id, 'tag')} + > + {option.name} + + ))} + + + ) + } + + const CheckboxFilter = () => { + if (!checkBoxFilter) return <> + return ( + + {checkBoxFilter.name} + + {checkBoxFilter.options.map((option, index) => ( + handleFilterClick(option.id, 'checklist')} + /> + ))} + + + ) + } + + const Divider = () => { + return ( + +
+
+ ) + } + const FilterModal = () => { return ( <> @@ -90,41 +140,9 @@ const Filter = ({ tagFilter, checkBoxFilter, onApply }: Props) => { - - {tagFilter.name} - - {tagFilter.options.map((option, index) => ( - handleFilterClick(option.id, 'tag')} - > - {option.name} - - ))} - - - -
-
- - {checkBoxFilter.name} - - {checkBoxFilter.options.map((option, index) => ( - handleFilterClick(option.id, 'checklist')} - /> - ))} - - + + {checkBoxFilter && tagFilter && } +