Skip to content
This repository was archived by the owner on Dec 6, 2025. It is now read-only.

Commit 4537d0b

Browse files
authored
feat: remove Span component in favor of a twind class (#1141)
* feat: remove Span component in favor of a twind class * fix: fix Tile component usage of classnames * fix: fix lint * fix: fix lint
1 parent e2b0331 commit 4537d0b

103 files changed

Lines changed: 389 additions & 516 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

landing-page/components/Footer.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { useEffect } from 'react'
22
import { useTranslation } from '@helpwave/common/hooks/useTranslation'
33
import * as CookieConsent from 'vanilla-cookieconsent'
4-
import { Span } from '@helpwave/common/components/Span'
54
import { Helpwave } from '@helpwave/common/icons/Helpwave'
65
import { tw } from '@helpwave/common/twind'
76
import type { Languages } from '@helpwave/common/hooks/useLanguage'
@@ -116,7 +115,7 @@ const Footer = () => {
116115
<div
117116
className={tw('flex flex-row justify-center w-full h-[128px] items-center justify-center mx-auto font-space')}>
118117
<Helpwave color="white" size={128}/>
119-
<Span type="subsectionTitle">&copy; {year} helpwave</Span>
118+
<span className={tw('textstyle-title-normal')}>&copy; {year} helpwave</span>
120119
</div>
121120
</div>
122121
)

landing-page/components/Header.tsx

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { Span } from '@helpwave/common/components/Span'
21
import { Helpwave } from '@helpwave/common/icons/Helpwave'
32
import { tw } from '@helpwave/common/twind'
43
import { Menu as MenuIcon, X } from 'lucide-react'
@@ -102,8 +101,6 @@ const Header = () => {
102101
const [navbarOpen, setNavbarOpen] = useState(false)
103102
const translation = useTranslation(defaultHeaderTranslation, {})
104103

105-
const navigationItemStyle = tw('!font-bold font-space')
106-
107104
return (
108105
<>
109106
<div className={tw('absolute flex flex-row justify-center top-0 w-screen z-[50] bg-hw-grayscale-50 mobile:px-6 tablet:px-12 desktop:px-24')}>
@@ -122,18 +119,18 @@ const Header = () => {
122119
<div key={name}>
123120
{subpage === undefined ? (
124121
<Link href={url}>
125-
<Span className={navigationItemStyle}>
122+
<span className={tw('textstyle-navigation-item')}>
126123
{translation[name]}
127-
</Span>
124+
</span>
128125
</Link>
129126
) : (
130127
<Menu<HTMLDivElement>
131128
alignment="tl"
132129
trigger={(onClick, ref) => (
133130
<div ref={ref} onClick={onClick} className={tw('cursor-pointer select-none')}>
134-
<Span className={navigationItemStyle}>
131+
<span className={tw('textstyle-navigation-item')}>
135132
{translation[name]}
136-
</Span>
133+
</span>
137134
</div>
138135
)}
139136
showOnHover={true}
@@ -146,9 +143,9 @@ const Header = () => {
146143
(
147144
<Link key={subPageName} className={tw('cursor-pointer')} href={subPageExternal ? subPageUrl : url + subPageUrl}>
148145
<MenuItem alignment="left">
149-
<Span className={navigationItemStyle}>
146+
<span className={tw('textstyle-navigation-item')}>
150147
{translation[subPageName]}
151-
</Span>
148+
</span>
152149
</MenuItem>
153150
</Link>
154151
))}
@@ -183,9 +180,9 @@ const Header = () => {
183180

184181
<div className={tw('w-full p-2')}>
185182
<Link href="/" onClick={() => setNavbarOpen(false)}>
186-
<Span type="heading">
183+
<span className={tw('textstyle-title-lg')}>
187184
home
188-
</Span>
185+
</span>
189186
</Link>
190187
</div>
191188

@@ -197,16 +194,16 @@ const Header = () => {
197194
<div key={name} className={tw('w-full p-2')}>
198195
{subpage === undefined ? (
199196
<Link href={url} onClick={() => setNavbarOpen(false)}>
200-
<Span type="heading">
197+
<span className={tw('textstyle-title-lg')}>
201198
{translation[name]}
202-
</Span>
199+
</span>
203200
</Link>
204201
) : (
205202
<Menu<HTMLDivElement> alignment="tl" trigger={(onClick, ref) => (
206203
<div ref={ref} onClick={onClick} className={tw('cursor-pointer select-none')}>
207-
<Span type="heading">
204+
<span className={tw('textstyle-title-lg')}>
208205
{translation[name]}
209-
</Span>
206+
</span>
210207
</div>
211208
)}>
212209
{subpage.map(({
@@ -218,9 +215,9 @@ const Header = () => {
218215
<Link key={subPageName} className={tw('cursor-pointer')} onClick={() => setNavbarOpen(false)}
219216
href={subPageExternal ? subPageUrl : url + subPageUrl}>
220217
<MenuItem alignment="left">
221-
<Span type="heading">
218+
<span className={tw('textstyle-title-lg')}>
222219
{translation[subPageName]}
223-
</Span>
220+
</span>
224221
</MenuItem>
225222
</Link>
226223
))}

landing-page/components/NewsLetterForm.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import type { Languages } from '@helpwave/common/hooks/useLanguage'
22
import type { PropsForTranslation } from '@helpwave/common/hooks/useTranslation'
33
import { useTranslation } from '@helpwave/common/hooks/useTranslation'
44
import { tw } from '@helpwave/common/twind'
5-
import { Span } from '@helpwave/common/components/Span'
65
import { Input } from '@helpwave/common/components/user-input/Input'
76
import { useState } from 'react'
87
import { Select } from '@helpwave/common/components/user-input/Select'
@@ -119,8 +118,8 @@ export const NewsLetterForm = ({
119118
return (
120119
<div className={tw('rounded-lg py-2 px-4 w-full bg-[#FFFFFFEE] border border-2')}>
121120
<div className={tw('flex flex-col')}>
122-
<Span type="title">{translation.title}</Span>
123-
<Span type="formDescription">{translation.subtitle}</Span>
121+
<span className={tw('textstyle-title-md')}>{translation.title}</span>
122+
<span className={tw('textstyle-form-description')}>{translation.subtitle}</span>
124123
<div className={tw('flex flex-col my-2 gap-y-1')}>
125124
<form>
126125
<Input

landing-page/components/PartnerList.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { tw } from '@twind/core'
22
import Image from 'next/image'
3-
import { Span } from '@helpwave/common/components/Span'
43
import { Carousel } from '@helpwave/common/components/layout/Carousel'
54

65
export type Partner = {
@@ -22,7 +21,7 @@ export const PartnerList = ({
2221
}: PartnerListProps) => {
2322
return (
2423
<div className={tw('flex flex-col gap-y-4 items-center w-full')}>
25-
<Span type="title" className={tw('!text-2xl')}>{title}</Span>
24+
<span className={tw('textstyle-title-lg')}>{title}</span>
2625
<Carousel
2726
hintNext={true} isLooping={true} isAutoLooping={true}
2827
heights={{

landing-page/components/sections/landing/MarketStatsSection.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { tw } from '@helpwave/common/twind'
22
import type { PropsForTranslation } from '@helpwave/common/hooks/useTranslation'
33
import { useTranslation } from '@helpwave/common/hooks/useTranslation'
44
import type { Languages } from '@helpwave/common/hooks/useLanguage'
5-
import { Span } from '@helpwave/common/components/Span'
65
import type { PropsWithChildren } from 'react'
76
import Image from 'next/image'
87
import { SectionBase } from '@/components/sections/SectionBase'
@@ -16,8 +15,8 @@ const MarketStatsItem = ({ children, stat, title }: MarketStatsItemProps) => {
1615
return (
1716
<div className={tw('flex flex-col items-center')}>
1817
{children}
19-
<Span className={tw('text-3xl mobile:text-xl mt-2 mobile:font-semibold')}>{stat}</Span>
20-
<h4><Span type="description" className={tw('text-xl mobile:!text-base')}>{title}</Span></h4>
18+
<span className={tw('text-3xl mobile:text-xl mt-2 mobile:font-semibold')}>{stat}</span>
19+
<h4><span className={tw('textstyle-description text-xl mobile:!text-base')}>{title}</span></h4>
2120
</div>
2221
)
2322
}
@@ -52,7 +51,7 @@ const MarketStatsSection = ({ overwriteTranslation }: PropsForTranslation<Market
5251
return (
5352
<SectionBase backgroundColor="darkSecondary" className={tw('flex flex-col text-white pb-24 font-space')}>
5453
<h1 className={tw('w-full text-3xl text-center font-space')}>{translation.germanyHealthcareSystem}</h1>
55-
<Span type="description" className={tw('text-center')}>{translation.marketPotential}</Span>
54+
<span className={tw('text-center textstyle-description')}>{translation.marketPotential}</span>
5655
<div className={tw('mt-8 w-full flex flex-wrap gap-y-16 gap-x-32 justify-evenly items-center')}>
5756
<MarketStatsItem stat="1.800" title={translation.hospitals}>
5857
{/* Image needs attribution to https://www.flaticon.com/free-icon/hospital_3809392?term=hospital&page=1&position=8&origin=search&related_id=3809392 */}

landing-page/components/sections/landing/StartSection.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import type { PropsForTranslation } from '@helpwave/common/hooks/useTranslation'
33
import { useTranslation } from '@helpwave/common/hooks/useTranslation'
44
import type { Languages } from '@helpwave/common/hooks/useLanguage'
55
import Image from 'next/image'
6-
import { Span } from '@helpwave/common/components/Span'
76
import { MarkdownInterpreter } from '@helpwave/common/components/MarkdownInterpreter'
87
import { SectionBase } from '@/components/sections/SectionBase'
98

@@ -32,8 +31,8 @@ const StartSection = ({ overwriteTranslation }: PropsForTranslation<LandingPageT
3231
>
3332
<div className={tw('flex flex-col items-center flex-1')}>
3433
<div className={tw('flex flex-col gap-y-2 max-w-[600px]')}>
35-
<h1><Span type="title" className={tw('!text-4xl')}>{translation.title}</Span></h1>
36-
<Span className={tw('font-space font-semibold !text-2xl')}><MarkdownInterpreter text={translation.description}/></Span>
34+
<h1 className={tw('textstyle-title-2xl')}>{translation.title}</h1>
35+
<span className={tw('textstyle-title-lg')}><MarkdownInterpreter text={translation.description}/></span>
3736
</div>
3837
</div>
3938
<div className={tw('desktop:relative desktop:right-0 p-4 pr-0 mobile:pr-4 rounded-l-3xl mobile:rounded-3xl bg-white w-2/5 tablet:min-w-[360px] mobile:w-4/5 z-10 h-fit shadow-around-lg')}>

landing-page/components/sections/landing/StepsToDigitalizationSection.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { tw } from '@helpwave/common/twind'
22
import type { Languages } from '@helpwave/common/hooks/useLanguage'
33
import { useTranslation } from '@helpwave/common/hooks/useTranslation'
4-
import { Span } from '@helpwave/common/components/Span'
54
import { MarkdownInterpreter } from '@helpwave/common/components/MarkdownInterpreter'
65
import type { TextImageProps } from '@helpwave/common/components/TextImage'
76
import { TextImage } from '@helpwave/common/components/TextImage'
@@ -97,8 +96,8 @@ export const StepsToDigitalizationSection = () => {
9796
return (
9897
<SectionBase className={tw('flex flex-col gap-y-8 w-full !max-w-[1600px]')} outerClassName={tw('!px-0')}>
9998
<div className={tw('flex flex-col items-center text-center gap-y-2')}>
100-
<h2><Span type="title" className={tw('!text-3xl')}><MarkdownInterpreter text={translation.title}/></Span></h2>
101-
<Span className={tw('font-space font-semibold')}><MarkdownInterpreter text={translation.description}/></Span>
99+
<h2 className={tw('textstyle-title-xl')}><MarkdownInterpreter text={translation.title}/></h2>
100+
<span className={tw('textstyle-title-sm')}><MarkdownInterpreter text={translation.description}/></span>
102101
</div>
103102
<Carousel hintNext={true} isLooping={true} isAutoLooping={true} heights={{ tablet: 300 }} blurColor="hw-grayscale-50">
104103
{items.map((value, index) => (

landing-page/components/sections/landing/TasksDemoSection.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { tw } from '@helpwave/common/twind'
22
import type { Languages } from '@helpwave/common/hooks/useLanguage'
33
import { useTranslation } from '@helpwave/common/hooks/useTranslation'
44
import { HelpwaveBadge } from '@helpwave/common/components/HelpwaveBadge'
5-
import { Span } from '@helpwave/common/components/Span'
65
import Link from 'next/link'
76
import Image from 'next/image'
87
import { ItemGrid } from '@helpwave/common/components/layout/ItemGrid'
@@ -55,7 +54,7 @@ export const TasksDemoSection = () => {
5554
<div className={tw('flex flex-col desktop:flex-row w-full items-end justify-between gap-x-16 gap-y-8')}>
5655
<div className={tw('flex flex-col gap-y-4 desktop:max-w-[70%]')}>
5756
<HelpwaveBadge className={tw('!text-hw-primary-800 !bg-hw-primary-200 !w-fit')} title={translation.helpwaveTasks}/>
58-
<Span type="title" className={tw('!text-2xl')}>{translation.workflowManagement}</Span>
57+
<span className={tw('textstyle-title-lg')}>{translation.workflowManagement}</span>
5958
<ItemGrid columns={1} className={tw('font-medium mt-2')}>
6059
{translation.feature1}
6160
{translation.feature2}

landing-page/components/sections/landing/VisionSection.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { useTranslation } from '@helpwave/common/hooks/useTranslation'
44
import type { Languages } from '@helpwave/common/hooks/useLanguage'
55
import Image from 'next/image'
66
import { Chip } from '@helpwave/common/components/ChipList'
7-
import { Span } from '@helpwave/common/components/Span'
87
import { MarkdownInterpreter } from '@helpwave/common/components/MarkdownInterpreter'
98
import { SectionBase } from '@/components/sections/SectionBase'
109

@@ -38,8 +37,8 @@ const StartSection = ({ overwriteTranslation }: PropsForTranslation<VisionSectio
3837
>
3938
<div className={tw('flex flex-col w-1/2 mobile:w-full gap-y-2')}>
4039
<Chip className={tw('!w-fit bg-gray-200 font-semibold px-4')}>{translation.ourVision}</Chip>
41-
<h2><Span type="title" className={tw('!text-3xl')}>{translation.title}</Span></h2>
42-
<Span className={tw('font-inter font-semibold')}><MarkdownInterpreter text={translation.description}/></Span>
40+
<h2 className={tw('textstyle-title-xl')}>{translation.title}</h2>
41+
<span className={tw('font-inter font-semibold')}><MarkdownInterpreter text={translation.description}/></span>
4342
</div>
4443
<Image src={imageURL} alt="" width={0} height={0} className={tw('mobile:w-full w-1/2')}/>
4544
</SectionBase>

landing-page/components/sections/mediQuu/BrandInformationSection.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,16 @@ export const BrandDescriptionsSection = () => {
5252
return (
5353
<SectionBase className={tw('flex flex-col gap-8 justify-center')} backgroundColor="gray">
5454
<Tile
55-
title={{ value: translation.aboutMediQuuTitle, type: 'title' }}
56-
description={{ value: translation.aboutMediQuuDescription, type: 'normal' }}
55+
title={{ value: translation.aboutMediQuuTitle, className: 'textstyle-title-lg' }}
56+
description={{ value: translation.aboutMediQuuDescription, className: '' }}
5757
prefix={(
5858
<Image src="https://cdn.helpwave.de/mediquu/logo_2021.png" alt="" width={220} height={64} />
5959
)}
6060
className={tw('bg-white rounded-3xl px-6 mobile:py-6 tablet:py-12 desktop:py-16 !gap-6 !w-fit shadow-md mobile:flex-col tablet:flex-col')}
6161
/>
6262
<Tile
63-
title={{ value: translation.aboutHelpwaveTitle, type: 'title' }}
64-
description={{ value: translation.aboutHelpwaveDescription, type: 'normal' }}
63+
title={{ value: translation.aboutHelpwaveTitle, className: 'textstyle-title-lg' }}
64+
description={{ value: translation.aboutHelpwaveDescription, className: '' }}
6565
prefix={(
6666
<div className={tw('min-w-[220px]')}>
6767
<HelpwaveBadge

0 commit comments

Comments
 (0)