mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2026-03-01 12:44:17 +00:00
* support for svg files Support to load svg files and include them as bas64 encoded images in the bundle. * navbar svgs * replace NavBar SVGs with heroicons * layercontrol icons * lint fix * quest - questionmark * plusbutton - plus * linkeditem - elipse-vertical - link-slash * contactinfo - envelope & phone * avatar - arrow-up-tray * ActionButton - link & plus * StartEndView - calendar x2 * HeaderView - ellipse-vertical & pencil & trash * SidebarControl - bars-3 * SearchControl - flag & magnifying-glass * GratitudeControl - heart * FilterControl - funnel * AddButton - plus * reduce test coverage requirements * remove wrongfully commit dummy svg * updated obsolete package.lock * migrate more svgs from code to file, use hero icons where it seems applicable * moved share icons to subfolder * fixed layout --------- Co-authored-by: Anton Tranelis <mail@antontranelis.de>
36 lines
1.1 KiB
TypeScript
36 lines
1.1 KiB
TypeScript
/* eslint-disable @typescript-eslint/prefer-optional-chain */
|
|
import CalendarIcon from '@heroicons/react/24/solid/CalendarDaysIcon'
|
|
|
|
import type { Item } from '#types/Item'
|
|
|
|
/**
|
|
* @category Map
|
|
*/
|
|
export const StartEndView = ({ item }: { item?: Item }) => {
|
|
return (
|
|
<div className='tw-flex tw-flex-row tw-mb-4 tw-mt-1'>
|
|
<div className='tw-basis-2/5 tw-flex tw-flex-row'>
|
|
<CalendarIcon className='tw-h-4 tw-w-4 tw-mr-2' />
|
|
<time
|
|
className='tw-align-middle'
|
|
dateTime={item && item.start ? item.start.substring(0, 10) : ''}
|
|
>
|
|
{item && item.start ? new Date(item.start).toLocaleDateString() : ''}
|
|
</time>
|
|
</div>
|
|
<div className='tw-basis-1/5 tw-place-content-center'>
|
|
<span>-</span>
|
|
</div>
|
|
<div className='tw-basis-2/5 tw-flex tw-flex-row'>
|
|
<CalendarIcon className='tw-h-4 tw-w-4 tw-mr-2' />
|
|
<time
|
|
className='tw-align-middle'
|
|
dateTime={item && item.end ? item.end.substring(0, 10) : ''}
|
|
>
|
|
{item && item.end ? new Date(item.end).toLocaleDateString() : ''}
|
|
</time>
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|