Skip to content

Commit

Permalink
Merge pull request #60 from Dev-Motion/fix/time-alignment
Browse files Browse the repository at this point in the history
fix: improv layout & centering in Time widget(#59)
  • Loading branch information
Code-Victor authored Nov 22, 2023
2 parents e271356 + 7c6858e commit e039720
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions src/components/inc/widgets/Time.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const Time = () => {
state.showTime,
state.showGreeting,
],
shallow
shallow,
);
const timeDate = new Date(time);
useEffect(() => {
Expand Down Expand Up @@ -61,7 +61,12 @@ const Time = () => {
}}
>
{showTime && (
<Box css={{}}>
<Box
css={{
mx: "auto",
width: "min-content",
}}
>
<Box
css={{
position: "relative",
Expand All @@ -70,8 +75,10 @@ const Time = () => {
<Text
as="h1"
fs="6xl"
// ta="center"
css={{
fontWeight: 700,
width: "min-content",
}}
>
{timeString}
Expand Down Expand Up @@ -104,7 +111,11 @@ const Time = () => {
</Box>
)}
{showGreeting && (
<Text fs="2xl" ta="center" css={{ mt: "$2", fontWeight: 600 }}>
<Text
fs="2xl"
ta="center"
css={{ mt: "$2", fontWeight: 600, maxWidth: 480, mx: "auto" }}
>
Good {getDaySegment(timeDate)}, {name}
</Text>
)}
Expand Down

0 comments on commit e039720

Please sign in to comment.