Skip to content

Commit

Permalink
feat: adds menu documentation section
Browse files Browse the repository at this point in the history
  • Loading branch information
Pvcunha committed Jan 8, 2024
1 parent 4b2c0a0 commit beff01a
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/components/dropdown-menu/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Box } from '@vtex/brand-ui'

import DocumentationCard from 'components/documentation-card'
import {
documentationData,
menuDocumentationData,
menuSupportData,
updatesData,
} from 'utils/constants'
Expand All @@ -19,7 +19,7 @@ const DropdownMenu = () => {
sx={styles.documentationContainer}
data-cy="dropdown-menu-first-section"
>
{documentationData(intl).map((card) => (
{menuDocumentationData(intl).map((card) => (
<DocumentationCard
containerType="dropdown"
key={card.title}
Expand Down
27 changes: 26 additions & 1 deletion src/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,32 @@ libraryConfig
export const messages = getMessages()

export const documentationData = (intl: IntlShape) => {
const data: DocDataElement[] = [
{
Icon: StartHereIcon,
title: intl.formatMessage({
id: 'documentation_start_here.title',
}),
description: intl.formatMessage({
id: 'documentation_start_here.description',
}),
link: '/docs/tracks',
},
{
Icon: TutorialsIcon,
title: intl.formatMessage({
id: 'documentation_tutorials.title',
}),
description: intl.formatMessage({
id: 'documentation_tutorials.description',
}),
link: '/docs/tutorial',
},
]
return data
}

export const menuDocumentationData = (intl: IntlShape) => {
const data: DocDataElement[] = [
{
Icon: StartHereIcon,
Expand All @@ -53,7 +79,6 @@ export const documentationData = (intl: IntlShape) => {
link: '/docs/tutorial',
},
{
// Checar com thaylly se deve ficar no mesmo lugar
Icon: DeveloperPortalIcon,
title: intl.formatMessage({
id: 'documentation_developers_portal.title',
Expand Down

0 comments on commit beff01a

Please sign in to comment.