mirror of
https://github.com/gethomepage/homepage.git
synced 2025-12-07 09:35:54 -08:00
Enhancement: Add href to info widgets
This commit is contained in:
@@ -33,7 +33,10 @@ export default function DateTime({ options }) {
|
||||
return (
|
||||
<Container options={options} additionalClassNames="information-widget-datetime">
|
||||
<Raw>
|
||||
<div className="flex flex-row items-center grow justify-end">
|
||||
<div
|
||||
onClick={() => (options.href ? window.location.assign(options.href) : [])}
|
||||
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>
|
||||
|
||||
@@ -57,7 +57,10 @@ export function getBottomBlock(children) {
|
||||
|
||||
export default function Container({ children = [], options, additionalClassNames = "" }) {
|
||||
return (
|
||||
<div className={getAllClasses(options, `${additionalClassNames} widget-container`)}>
|
||||
<div
|
||||
onClick={() => (options.href ? window.location.assign(options.href) : [])}
|
||||
className={getAllClasses(options, `${additionalClassNames} widget-container`)}
|
||||
>
|
||||
{getInnerBlock(children)}
|
||||
{getBottomBlock(children)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user