feat(SW-1968): Alternate opening hours for restaurants

Approved-by: Matilda Landström
This commit is contained in:
Erik Tiekstra
2025-03-26 08:04:37 +00:00
parent adf81bf5c9
commit 4ff44311a9
11 changed files with 554 additions and 87 deletions

View File

@@ -4,7 +4,7 @@ import { variants } from './variants'
import type { TypographyProps } from './types'
export function Typography({ variant, children }: TypographyProps) {
export function Typography({ variant, className, children }: TypographyProps) {
if (!isValidElement(children)) return null
const classNames = variants({
@@ -13,6 +13,8 @@ export function Typography({ variant, children }: TypographyProps) {
return cloneElement(children, {
...children.props,
className: [children.props.className, classNames].filter(Boolean).join(' '),
className: [className, children.props.className, classNames]
.filter(Boolean)
.join(' '),
})
}