extracted strings from awards tab

This commit is contained in:
Amruth Pillai
2020-03-30 01:23:15 +05:30
parent 959c843983
commit 03c181af8e
8 changed files with 90 additions and 106 deletions

20
src/shared/ItemHeading.js Normal file
View File

@ -0,0 +1,20 @@
import React from 'react';
import { useTranslation } from 'react-i18next';
const ItemHeading = ({ title, heading, isOpen, setOpen }) => {
const { t } = useTranslation();
return (
<div
className="flex justify-between items-center cursor-pointer"
onClick={() => setOpen(!isOpen)}
>
<h6 className="text-sm font-medium">
{typeof heading === 'undefined' ? title : t('item.add', { heading })}
</h6>
<i className="material-icons">{isOpen ? 'expand_less' : 'expand_more'}</i>
</div>
);
};
export default ItemHeading;