mirror of
https://github.com/SomboChea/ui
synced 2024-09-29 12:57:52 +07:00
31 lines
872 B
TypeScript
31 lines
872 B
TypeScript
|
import React from 'react';
|
||
|
import styled from '@emotion/styled';
|
||
|
import { useTranslation } from 'react-i18next';
|
||
|
|
||
|
import Text from '../../muiComponents/Text';
|
||
|
import { Theme } from '../../design-tokens/theme';
|
||
|
|
||
|
import { DeveloperType } from './types';
|
||
|
|
||
|
interface Props {
|
||
|
type: DeveloperType;
|
||
|
}
|
||
|
|
||
|
const DevelopersTitle: React.FC<Props> = ({ type }) => {
|
||
|
const { t } = useTranslation();
|
||
|
switch (type) {
|
||
|
case DeveloperType.CONTRIBUTORS:
|
||
|
return <StyledText variant={'subtitle1'}>{t('sidebar.contributors.title')}</StyledText>;
|
||
|
case DeveloperType.MAINTAINERS:
|
||
|
return <StyledText variant={'subtitle1'}>{t('sidebar.maintainers.title')}</StyledText>;
|
||
|
return null;
|
||
|
}
|
||
|
};
|
||
|
|
||
|
export default DevelopersTitle;
|
||
|
|
||
|
const StyledText = styled(Text)<{ theme?: Theme }>(({ theme }) => ({
|
||
|
fontWeight: theme && theme.fontWeight.bold,
|
||
|
marginBottom: '10px',
|
||
|
}));
|