-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update 'See more' buttons on About us page (#1207)
* Updated Show more button * Update haredcoded value
- Loading branch information
1 parent
9bcdebd
commit af28c13
Showing
5 changed files
with
47 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 0 additions & 26 deletions
26
src/components/about/sections/ManagementBoardSection/ManagementBoardDescription.tsx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
src/components/about/sections/ManagementBoardSection/TeamMemberDescription.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { useState } from 'react' | ||
|
||
import { useTranslation } from 'next-i18next' | ||
|
||
import theme from 'common/theme' | ||
|
||
import { ShowMoreButton, Description } from './ManagementBoardsection.styled' | ||
|
||
type Props = { | ||
description: string | ||
} | ||
export function TeamMemberDescription({ description }: Props) { | ||
const { t } = useTranslation('about') | ||
|
||
const [show, setShow] = useState(false) | ||
|
||
return ( | ||
<> | ||
<Description variant="body2" height={show ? 'auto' : theme.spacing(25)}> | ||
{description} | ||
</Description> | ||
<ShowMoreButton onClick={() => setShow(!show)}> | ||
{show ? t('about.see-less') : t('about.see-more')} | ||
</ShowMoreButton> | ||
</> | ||
) | ||
} |