Skip to content

Commit

Permalink
Merge pull request #603 from xproglabs/fix/adjust-propLinks-prensa
Browse files Browse the repository at this point in the history
Add property linkProps to Teaser/TeaserRelated props
  • Loading branch information
gbombassaro authored Nov 13, 2023
2 parents 7d7d336 + 9c03ec3 commit 68c012c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
5 changes: 3 additions & 2 deletions packages/xprog-prensa/news/Teaser/Related/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ const Related: React.FC<t.RelatedProps> = ({
css,
customProps,
items,
layout
layout,
linkProps
}) => {
return (
<S.RelatedContainer css={css} customProps={customProps}>
{map(items, (item, key) => (
<Teaser {...layout} {...item} key={key} />
<Teaser {...layout} {...item} linkProps={linkProps} key={key} />
))}
</S.RelatedContainer>
)
Expand Down
4 changes: 3 additions & 1 deletion packages/xprog-prensa/news/Teaser/Related/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ReactNode } from 'react'
import { LinkProps } from '../../../primitives/Link/types'

import {
BlockType,
Expand All @@ -16,7 +17,8 @@ interface RelatedContainerProps extends ContainerDefaultProps {
interface RelatedProps extends RelatedContainerProps {
css?: CSSType;
items?: TeaserProps[];
layout?: TeaserProps
layout?: TeaserProps,
linkProps?: LinkProps;
}

type RelatedVariant = CSSVariant
Expand Down
3 changes: 2 additions & 1 deletion packages/xprog-prensa/news/Teaser/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ const Teaser: React.FC<t.TeaserProps> = ({
customLink,
customLinkProps,
slotColor
}
},
linkProps
}
const TeaserSubject: React.FC<t.SubjectProps> | undefined = components?.subject
const TeaserSubjectProps: t.SubjectProps = {
Expand Down

0 comments on commit 68c012c

Please sign in to comment.