Add task list demo application
This commit is contained in:
15
examples/task-list/src/date-time.tsx
Normal file
15
examples/task-list/src/date-time.tsx
Normal file
@@ -0,0 +1,15 @@
|
||||
export const DateTime = ({ date, title }: { date: Date; title: string }) => {
|
||||
return (
|
||||
<div className="flex gap-2 text-xs sm:flex-row">
|
||||
<h3 className="font-semibold sm:after:content-[':'] after:text-gray-900 text-primary-800">
|
||||
{title}
|
||||
</h3>
|
||||
<p>
|
||||
{date.toLocaleString(undefined, {
|
||||
dateStyle: 'short',
|
||||
timeStyle: 'short',
|
||||
})}
|
||||
</p>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user