diff --git a/apps/webapp/src/components/HomePage/HomePage.css.ts b/apps/webapp/src/components/HomePage/HomePage.css.ts index 0ada1771..1e09eb43 100644 --- a/apps/webapp/src/components/HomePage/HomePage.css.ts +++ b/apps/webapp/src/components/HomePage/HomePage.css.ts @@ -33,9 +33,6 @@ export const titleSide = style({ }) export const title = style({ - color: vars.color.text, - fontSize: '2rem', - fontWeight: vars.fontWeight.medium, paddingBottom: '0.75rem', }) diff --git a/apps/webapp/src/components/HomePage/HomePage.tsx b/apps/webapp/src/components/HomePage/HomePage.tsx index afb49423..f9a9ba7a 100644 --- a/apps/webapp/src/components/HomePage/HomePage.tsx +++ b/apps/webapp/src/components/HomePage/HomePage.tsx @@ -1,5 +1,7 @@ import React from 'react' +import { Title } from '../Title' + import FunArrow from './FunArrow.svg?react' import HomeCinema from './HomeCinema.svg?react' import * as s from './HomePage.css' @@ -16,7 +18,9 @@ export const HomePage = () => (
-
Watching many shows at a time?
+ + Watching many shows at a time? +

Always know which episode to watch next. Keep track of your series and seen episodes with{' '} diff --git a/apps/webapp/src/components/Title/Title.css.ts b/apps/webapp/src/components/Title/Title.css.ts new file mode 100644 index 00000000..144f2788 --- /dev/null +++ b/apps/webapp/src/components/Title/Title.css.ts @@ -0,0 +1,36 @@ +import { style, styleVariants } from '@vanilla-extract/css' + +import { vars } from '#/styles/theme.css' + +export const title = style({ + color: vars.color.text, + fontWeight: vars.fontWeight.medium, +}) + +export const titleSize = styleVariants({ + l: { + fontSize: '2rem', + }, + + m: { + fontSize: '1.5rem', + }, + + s: { + fontSize: '1rem', + }, + + xs: { + fontSize: '0.875rem', + }, +}) + +export const titleVariant = styleVariants({ + default: { + color: vars.color.text, + }, + + tertiary: { + color: vars.color.textTertiary, + }, +}) diff --git a/apps/webapp/src/components/Title/Title.tsx b/apps/webapp/src/components/Title/Title.tsx new file mode 100644 index 00000000..04ebda6d --- /dev/null +++ b/apps/webapp/src/components/Title/Title.tsx @@ -0,0 +1,28 @@ +import classNames from 'classnames' +import React, { type HTMLAttributes } from 'react' + +import * as s from './Title.css' + +type TitleProps = HTMLAttributes & { + as?: 'h1' | 'h2' | 'h3' + size?: keyof typeof s.titleSize + variant?: keyof typeof s.titleVariant +} + +export const Title = ({ + as: Component = 'h1', + size = 'm', + variant = 'default', + className, + ...rest +}: TitleProps) => ( + +) diff --git a/apps/webapp/src/components/Title/index.ts b/apps/webapp/src/components/Title/index.ts new file mode 100644 index 00000000..9a3bed44 --- /dev/null +++ b/apps/webapp/src/components/Title/index.ts @@ -0,0 +1 @@ +export * from './Title' diff --git a/apps/webapp/src/components/index.ts b/apps/webapp/src/components/index.ts index 135f233b..b20509ad 100644 --- a/apps/webapp/src/components/index.ts +++ b/apps/webapp/src/components/index.ts @@ -11,5 +11,6 @@ export * from './IconButton' export * from './Tooltip' export * from './Error' export * from './AlertDialog' +export * from './Title' export * from './HomePage' diff --git a/apps/webapp/src/features/auth/components/AuthLayout/AuthLayout.css.ts b/apps/webapp/src/features/auth/components/AuthLayout/AuthLayout.css.ts index 297268f5..77c9ca04 100644 --- a/apps/webapp/src/features/auth/components/AuthLayout/AuthLayout.css.ts +++ b/apps/webapp/src/features/auth/components/AuthLayout/AuthLayout.css.ts @@ -17,8 +17,6 @@ export const formSide = style({ }) export const title = style({ - fontSize: '1.5rem', - fontWeight: vars.fontWeight.medium, marginBottom: '2rem', }) diff --git a/apps/webapp/src/features/auth/components/AuthLayout/AuthLayout.tsx b/apps/webapp/src/features/auth/components/AuthLayout/AuthLayout.tsx index e29e5890..956604d2 100644 --- a/apps/webapp/src/features/auth/components/AuthLayout/AuthLayout.tsx +++ b/apps/webapp/src/features/auth/components/AuthLayout/AuthLayout.tsx @@ -1,5 +1,7 @@ import React, { type ReactElement } from 'react' +import { Title } from '#/components' + import * as s from './AuthLayout.css' import HorrorMovie from './HorrorMovie.svg?react' @@ -12,7 +14,7 @@ export const AuthLayout = ({ children, otherAction }: AuthLayoutProps) => { return (
-

Serieslist

+ Serieslist {children}
diff --git a/apps/webapp/src/features/search/components/Search/Search.css.ts b/apps/webapp/src/features/search/components/Search/Search.css.ts index 7b9f6ab1..d2d9e3fc 100644 --- a/apps/webapp/src/features/search/components/Search/Search.css.ts +++ b/apps/webapp/src/features/search/components/Search/Search.css.ts @@ -69,9 +69,6 @@ export const searchTitle = style({ paddingRight: '1.25rem', paddingBottom: '0.25rem', paddingLeft: '1.25rem', - fontWeight: vars.fontWeight.medium, - color: vars.color.textTertiary, - fontSize: '0.875rem', }) export const searchResultsList = style({ diff --git a/apps/webapp/src/features/search/components/Search/Search.tsx b/apps/webapp/src/features/search/components/Search/Search.tsx index b9f5b750..e67150e3 100644 --- a/apps/webapp/src/features/search/components/Search/Search.tsx +++ b/apps/webapp/src/features/search/components/Search/Search.tsx @@ -13,7 +13,7 @@ import React, { import Highlighter from 'react-highlight-words' import { navigate } from 'vike/client/router' -import { Icon, LoadingSpinner } from '#/components' +import { Icon, LoadingSpinner, Title } from '#/components' import { SeriesPoster } from '#/features/series' import { graphql } from '#/generated/gql' import { useDebouncedCallback, useSSR } from '#/hooks' @@ -295,7 +295,14 @@ export const Search = ({ } else if (searchResults.length) { return ( <> -
Series
+ + Series +