Skip to content

Instantly share code, notes, and snippets.

@brunoksato
Created January 20, 2022 17:30
Show Gist options
  • Save brunoksato/9f3ddf32518423c36268520b92b11bfa to your computer and use it in GitHub Desktop.
Save brunoksato/9f3ddf32518423c36268520b92b11bfa to your computer and use it in GitHub Desktop.
next image responsive
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