Revert "Added optional boxed styling for information widgets and refactored information widgets"

This commit is contained in:
shamoon
2023-06-10 23:30:44 -07:00
committed by GitHub
parent 347761fcad
commit 6b2930ab8d
35 changed files with 854 additions and 642 deletions

View File

@@ -1,9 +1,6 @@
import { useState, useEffect } from "react";
import { useTranslation } from "next-i18next";
import Container from "../widget/container";
import Raw from "../widget/raw";
const textSizes = {
"4xl": "text-4xl",
"3xl": "text-3xl",
@@ -20,7 +17,7 @@ export default function DateTime({ options }) {
const { i18n } = useTranslation();
const [date, setDate] = useState("");
const dateLocale = locale ?? i18n.language;
useEffect(() => {
const dateFormat = new Intl.DateTimeFormat(dateLocale, { ...format });
const interval = setInterval(() => {
@@ -30,14 +27,12 @@ export default function DateTime({ options }) {
}, [date, setDate, dateLocale, format]);
return (
<Container options={options}>
<Raw>
<div className="flex flex-row items-center grow justify-end">
<span className={`text-theme-800 dark:text-theme-200 tabular-nums ${textSizes[textSize || "lg"]}`}>
{date}
</span>
</div>
</Raw>
</Container>
<div className="flex flex-col justify-center first:ml-0 ml-4">
<div className="flex flex-row items-center grow justify-end">
<span className={`text-theme-800 dark:text-theme-200 tabular-nums ${textSizes[textSize || "lg"]}`}>
{date}
</span>
</div>
</div>
);
}