feat(SW-1968): Alternate opening hours for restaurants
Approved-by: Matilda Landström
This commit is contained in:
@@ -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(' '),
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user