mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-15 01:01:43 +10:00
extracted strings from awards tab
This commit is contained in:
20
src/shared/ItemHeading.js
Normal file
20
src/shared/ItemHeading.js
Normal 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;
|
||||
Reference in New Issue
Block a user