refactor(style): move 'Posted on:' span text below the svg image for layout

This commit is contained in:
satnaing
2022-11-26 16:12:22 +06:30
parent 9e92f71838
commit d294526020
+1 -1
View File
@@ -7,7 +7,6 @@ export interface Props {
export default function Datetime({ datetime, size = "sm", className }: Props) { export default function Datetime({ datetime, size = "sm", className }: Props) {
return ( return (
<div className={`opacity-80 flex items-center space-x-2 ${className}`}> <div className={`opacity-80 flex items-center space-x-2 ${className}`}>
<span className="sr-only">Posted on:</span>
<svg <svg
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
className={`${ className={`${
@@ -18,6 +17,7 @@ export default function Datetime({ datetime, size = "sm", className }: Props) {
<path d="M7 11h2v2H7zm0 4h2v2H7zm4-4h2v2h-2zm0 4h2v2h-2zm4-4h2v2h-2zm0 4h2v2h-2z"></path> <path d="M7 11h2v2H7zm0 4h2v2H7zm4-4h2v2h-2zm0 4h2v2h-2zm4-4h2v2h-2zm0 4h2v2h-2z"></path>
<path d="M5 22h14c1.103 0 2-.897 2-2V6c0-1.103-.897-2-2-2h-2V2h-2v2H9V2H7v2H5c-1.103 0-2 .897-2 2v14c0 1.103.897 2 2 2zM19 8l.001 12H5V8h14z"></path> <path d="M5 22h14c1.103 0 2-.897 2-2V6c0-1.103-.897-2-2-2h-2V2h-2v2H9V2H7v2H5c-1.103 0-2 .897-2 2v14c0 1.103.897 2 2 2zM19 8l.001 12H5V8h14z"></path>
</svg> </svg>
<span className="sr-only">Posted on:</span>
<span className={`italic ${size === "sm" ? "text-sm" : "text-base"}`}> <span className={`italic ${size === "sm" ? "text-sm" : "text-base"}`}>
<FormattedDatetime datetime={datetime} /> <FormattedDatetime datetime={datetime} />
</span> </span>