Created
January 20, 2022 17:30
-
-
Save brunoksato/9f3ddf32518423c36268520b92b11bfa to your computer and use it in GitHub Desktop.
next image responsive
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import styled from "styled-components"; | |
import Image from "next/image" | |
type Props = { | |
title: string; | |
} | |
export default function BannerSobreNos({ title }: Props) { | |
return ( | |
<main> | |
<Title>{title}</Title> | |
<ImageContainer> | |
<Image layout="responsive" width={100} height={100} src="/assets/sobreNos/man_purple_icon.png" alt="Banner Sobre Nós" /> | |
</ImageContainer> | |
</main> | |
); | |
} | |
const Title = styled.h1` | |
font-size: 2.5rem; | |
font-weight: 700; | |
color: red; | |
` | |
const ImageContainer = styled.div` | |
display: block; | |
max-width: 100px; | |
max-height: 100px; | |
` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment