Fix linting issues
This commit is contained in:
parent
496dd1de73
commit
f53c53ccc0
@ -33,10 +33,7 @@ export default function DateTime({ options }) {
|
|||||||
return (
|
return (
|
||||||
<Container options={options} additionalClassNames="information-widget-datetime">
|
<Container options={options} additionalClassNames="information-widget-datetime">
|
||||||
<Raw>
|
<Raw>
|
||||||
<div
|
<div className="flex flex-row items-center grow justify-end">
|
||||||
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"]}`}>
|
<span className={`text-theme-800 dark:text-theme-200 tabular-nums ${textSizes[textSize || "lg"]}`}>
|
||||||
{date}
|
{date}
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@ -56,13 +56,19 @@ export function getBottomBlock(children) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default function Container({ children = [], options, additionalClassNames = "" }) {
|
export default function Container({ children = [], options, additionalClassNames = "" }) {
|
||||||
return (
|
return options.href ? (
|
||||||
<div
|
<a
|
||||||
onClick={() => (options.href ? window.location.assign(options.href) : [])}
|
href={options.href}
|
||||||
|
target={options.target ?? "_self"}
|
||||||
className={getAllClasses(options, `${additionalClassNames} widget-container`)}
|
className={getAllClasses(options, `${additionalClassNames} widget-container`)}
|
||||||
>
|
>
|
||||||
{getInnerBlock(children)}
|
{getInnerBlock(children)}
|
||||||
{getBottomBlock(children)}
|
{getBottomBlock(children)}
|
||||||
|
</a>
|
||||||
|
) : (
|
||||||
|
<div className={getAllClasses(options, `${additionalClassNames} widget-container`)}>
|
||||||
|
{getInnerBlock(children)}
|
||||||
|
{getBottomBlock(children)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user