react-icons/fi#FiCalendar JavaScript Examples
The following examples show how to use
react-icons/fi#FiCalendar.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: index.js From plataforma-sabia with MIT License | 5 votes |
IdeaCard = ({ hit: { id, title, description, keywords, user, created_at } }) => {
const [toggleShowMore, setToggleShowMore] = useState(false);
const handleToggleShowMore = () => {
setToggleShowMore((previousState) => !previousState);
};
return (
<S.Container key={id}>
<S.Title>{title}</S.Title>
<S.Description>
{toggleShowMore ? description : limitTextChar(description, MAX_DESC_LENGTH)}
</S.Description>
<S.PillWrapper>
{keywords?.map((keyword) => (
<S.Pill key={keyword}>{keyword}</S.Pill>
))}
</S.PillWrapper>
{toggleShowMore && (
<S.IconsWrapper>
{created_at && (
<div>
<FiCalendar fontSize={16} />
<span>
{stringToLocaleDate(created_at, {
day: 'numeric',
month: 'numeric',
year: 'numeric',
})}
</span>
</div>
)}
{user?.full_name && (
<div>
<FiUser fontSize={16} />
<span>{user?.full_name}</span>
</div>
)}
</S.IconsWrapper>
)}
<S.Button onClick={handleToggleShowMore}>
Mostrar {toggleShowMore ? 'menos' : 'mais'}
</S.Button>
</S.Container>
);
}
Example #2
Source File: index.js From dashboard-reactjs with MIT License | 4 votes |
export default function Dashboard() {
useEffect(() => {
document.title = 'Dashboard'
}, []);
return (
<>
<div className="col-12 title">
<h1>Olá, Bem vindo à Dashboard</h1>
</div>
<div className="col-3 px-0">
<CardDashboard className="red">
<div className="card-body">
<div className="row">
<div className="col">
<div className="title">Card One</div>
<div className="number pulsate">34</div>
</div>
<div className="col-auto">
<FiCalendar size="3em" />
</div>
</div>
</div>
</CardDashboard>
</div>
<div className="col-3 px-0">
<CardDashboard className="blue">
<div className="card-body">
<div className="row">
<div className="col">
<div className="title">Card Two</div>
<div className="number pulsate">0</div>
</div>
<div className="col-auto">
<FiMessageCircle size="3em" />
</div>
</div>
</div>
</CardDashboard>
</div>
<div className="col-3 px-0">
<CardDashboard className="green">
<div className="card-body">
<div className="row">
<div className="col">
<div className="title">Mensagens</div>
<div className="number pulsate">0</div>
</div>
<div className="col-auto">
<FiMessageCircle size="3em" />
</div>
</div>
</div>
</CardDashboard>
</div>
<div className="col-3 px-0">
<CardDashboard className="orange">
<div className="card-body">
<div className="row">
<div className="col">
<div className="title">Users</div>
<div className="number pulsate">0</div>
</div>
<div className="col-auto">
<FiUsers size="3em" />
</div>
</div>
</div>
</CardDashboard>
</div>
<div className="col-12 px-0">
<Card className="red">
<div className="card-title">
<h3>Tables</h3>
</div>
<div className="card-body">
<Table>
<thead>
<tr>
<th className="col-1">#</th>
<th className="col-8">Name</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{array.map(item => (
<tr>
<td style={{ textAlign: 'center' }}>{ item.id }</td>
<td style={{ textAlign: 'center' }}>{ item.name }</td>
<td style={{ textAlign: 'center' }}>
<button className="edit">
Edit
</button>
<button className="info">
Info
</button>
<button className="eraser">
Trash
</button>
</td>
</tr>
))}
</tbody>
</Table>
</div>
</Card>
</div>
</>
);
}