Skip to content

Commit

Permalink
Merge branch 'malj/2009' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
millianapia committed Dec 19, 2023
2 parents 5b3defe + 098f223 commit 9d4ecde
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion sanityv3/schemas/objects/teaser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const blockConfig = {
internalLink: false,
externalLink: false,
attachment: false,
lists: false,
lists: true,
}

const blockContentType = configureBlockContent({ ...blockConfig })
Expand Down
4 changes: 3 additions & 1 deletion web/components/src/Teaser/Content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import styled from 'styled-components'

const StyledContent = styled.div`
display: grid;
grid-gap: var(--space-large);
grid-auto-columns: auto;
align-items: center;
align-content: start;
Expand All @@ -13,6 +12,9 @@ const StyledContent = styled.div`
p {
margin-bottom: 0;
}
ul {
margin-bottom: var(--space-medium);
}
@media (min-width: 750px) {
/* max-height: 800px; */
Expand Down
14 changes: 11 additions & 3 deletions web/pageComponents/shared/Teaser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@ const StyledEnvisTeaser = styled(EnvisTeaser)`
font-size: var(--typeScale-1);
`

const StyledTeaserTitle = styled(TitleText)`
padding-bottom: var(--space-large);
`

const ContentWrapper = styled.div`
padding-bottom: var(--space-large);
`

const TeaserImage = ({ image }: { image: ImageWithAlt }) => {
const imageSrc =
image.extension === 'svg' ? urlFor(image).toString() : urlFor(image).size(1200, 800).auto('format').toString()
Expand Down Expand Up @@ -106,11 +114,11 @@ const Teaser = ({ data, anchor }: TeaserProps) => {
/>
)
) : (
<>
<ContentWrapper>
{overline && <Eyebrow>{overline}</Eyebrow>}
{title && <TitleText value={title} />}
{title && <StyledTeaserTitle value={title} />}
{text && <IngressText value={text} />}
</>
</ContentWrapper>
)}
{action && <TeaserAction action={action} />}
</Content>
Expand Down

0 comments on commit 9d4ecde

Please sign in to comment.