Skip to content

Commit

Permalink
Update labels font
Browse files Browse the repository at this point in the history
  • Loading branch information
justsoantsy committed Mar 23, 2024
1 parent b8be969 commit 7fb0ceb
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
2 changes: 2 additions & 0 deletions apps/web/src/components/Common/CategoryFilters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import HorizontalScroller from './HorizontalScroller'

type Props = {
heading?: string
headingClassName?: string;
}

const CategoryFilters: FC<Props> = ({ heading }) => {
Expand All @@ -25,6 +26,7 @@ const CategoryFilters: FC<Props> = ({ heading }) => {
<HorizontalScroller
sectionRef={sectionRef}
heading={heading ?? 'Explore The Garden🌱'}
headingClassName="font-syne font-extrabold"
/>
<div
ref={sectionRef}
Expand Down
5 changes: 3 additions & 2 deletions apps/web/src/components/Common/HorizontalScroller.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ import type { FC, RefObject } from 'react'

type Props = {
heading: string
headingClassName?: string;
sectionRef: RefObject<HTMLDivElement>
}

const HorizontalScroller: FC<Props> = ({ heading, sectionRef }) => {
const HorizontalScroller: FC<Props> = ({ heading, sectionRef, headingClassName }) => {
const sectionOffsetWidth = sectionRef.current?.offsetWidth ?? 1000
const scrollOffset = sectionOffsetWidth / 1.2

Expand All @@ -19,7 +20,7 @@ const HorizontalScroller: FC<Props> = ({ heading, sectionRef }) => {
return (
<div className="flex items-center justify-between">
<div className="flex items-center space-x-3 text-xl">
<h1 className="font-bold">{heading}</h1>
<h2 className={headingClassName}>{heading}</h2>
</div>
<div className="space-x-2">
<button
Expand Down
4 changes: 3 additions & 1 deletion apps/web/src/components/Home/TopSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ const TopSection = () => {

return (
<div className="flex flex-col">
<HorizontalScroller sectionRef={sectionRef} heading="Hottest Tea ☕" />
<HorizontalScroller sectionRef={sectionRef}
heading="Hottest Tea ☕"
headingClassName="font-syne font-extrabold" />
<div
ref={sectionRef}
className="no-scrollbar laptop:pt-6 relative flex items-start space-x-4 overflow-x-auto overflow-y-hidden scroll-smooth pt-4"
Expand Down
3 changes: 3 additions & 0 deletions packages/ui/tailwind-preset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ module.exports = {
darkMode: 'class',
theme: {
extend: {
fontFamily: {
syne: ['Syne', 'sans-serif'],
},
keyframes: {
shimmer: {
'0%, 100%': {
Expand Down

0 comments on commit 7fb0ceb

Please sign in to comment.