Skip to content

Commit

Permalink
fix(styleguide): fix faulty typing & invalid length check
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobias Maier committed May 22, 2024
1 parent 10aee72 commit db44651
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/styleguide/src/components/Figure/Image.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const GalleryButton = ({ gallerySize, onClick }: GalleryButtonProps) => {
}

type ImageProps = {
src: string
src?: string
dark?: {
src: string
srcSet?: string
Expand Down
4 changes: 2 additions & 2 deletions packages/styleguide/src/components/TeaserCarousel/Subject.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { css } from 'glamor'
import PropTypes from 'prop-types'
import React from 'react'
import React, { Children } from 'react'
import { mUp } from '../TeaserFront/mediaQueries'
import { sansSerifRegular16, sansSerifRegular18 } from '../Typography/styles'
import { useColorContext } from '../Colors/useColorContext'
Expand All @@ -23,7 +23,7 @@ const Subject = ({ children }: SubjectProps) => {
const [colorScheme] = useColorContext()
const customStyles = css(styles, {
'&::after': {
content: children.length ? ' ' : undefined,
content: Children.count(children) > 0 ? ' ' : undefined,
},
})
return (
Expand Down

0 comments on commit db44651

Please sign in to comment.