mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-14 17:00:32 +00:00
add greeting and datetime info widgets
This commit is contained in:
parent
43f7ccd166
commit
0075429e08
4 changed files with 66 additions and 4 deletions
22
src/components/widgets/greeting/greeting.jsx
Normal file
22
src/components/widgets/greeting/greeting.jsx
Normal file
|
@ -0,0 +1,22 @@
|
|||
const textSizes = {
|
||||
"4xl": "text-4xl",
|
||||
"3xl": "text-3xl",
|
||||
"2xl": "text-2xl",
|
||||
xl: "text-xl",
|
||||
lg: "text-lg",
|
||||
md: "text-md",
|
||||
sm: "text-sm",
|
||||
xs: "text-xs",
|
||||
};
|
||||
|
||||
export default function Greeting({ options }) {
|
||||
if (options.text) {
|
||||
return (
|
||||
<div className="flex flex-row items-center justify-start">
|
||||
<span className={`text-theme-800 dark:text-theme-200 ${textSizes[options.text_size || "xl"]}`}>
|
||||
{options.text}
|
||||
</span>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue