Skip to content

Commit

Permalink
added description for ForumPageHeader (#3904) (#3925)
Browse files Browse the repository at this point in the history
added description for ForumPageHeader
  • Loading branch information
mkbeefcake authored Dec 12, 2022
1 parent 8a34719 commit eba70a7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
7 changes: 6 additions & 1 deletion packages/ui/src/app/pages/Forum/ForumCategory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { Loading } from '@/common/components/Loading'
import { RowGapBlock } from '@/common/components/page/PageContent'
import { PageTitle } from '@/common/components/page/PageTitle'
import { PreviousPage } from '@/common/components/page/PreviousPage'
import { Label } from '@/common/components/typography'
import { Label, TextMedium } from '@/common/components/typography'
import { useModal } from '@/common/hooks/useModal'
import { useRefetchQueries } from '@/common/hooks/useRefetchQueries'
import { useSort } from '@/common/hooks/useSort'
Expand Down Expand Up @@ -73,6 +73,11 @@ export const ForumCategory = () => {
<PageTitle>{category.title}</PageTitle>
</PreviousPage>
}
description={
<TextMedium className="category-description" normalWeight inter lighter truncateLines={2}>
{category.description}
</TextMedium>
}
buttons={
<TransactionButton
style="primary"
Expand Down
5 changes: 4 additions & 1 deletion packages/ui/src/forum/components/ForumPageHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@ import React, { useState } from 'react'
import { PageHeaderRow, PageHeaderWrapper } from '@/app/components/PageLayout'
import { ButtonsGroup } from '@/common/components/buttons'
import { SearchBox } from '@/common/components/forms/FilterBox/FilterSearchBox'
import { TextMedium } from '@/common/components/typography'
import { useModal } from '@/common/hooks/useModal'

interface ForumPageHeaderProps {
title: React.ReactNode
children?: React.ReactNode
buttons?: React.ReactNode
description?: React.ReactNode
}
export const ForumPageHeader = ({ title, children, buttons }: ForumPageHeaderProps) => {
export const ForumPageHeader = ({ title, children, buttons, description }: ForumPageHeaderProps) => {
const [search, setSearch] = useState('')

const { showModal } = useModal()
Expand All @@ -28,6 +30,7 @@ export const ForumPageHeader = ({ title, children, buttons }: ForumPageHeaderPro
{buttons}
</ButtonsGroup>
</PageHeaderRow>
{description && <PageHeaderRow>{description}</PageHeaderRow>}
{children}
</PageHeaderWrapper>
)
Expand Down

2 comments on commit eba70a7

@vercel
Copy link

@vercel vercel bot commented on eba70a7 Dec 12, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on eba70a7 Dec 12, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

pioneer-2 – ./

pioneer-2-joystream.vercel.app
pioneer-2-git-dev-joystream.vercel.app
pioneer-2.vercel.app

Please sign in to comment.