(JSX attribute) layout: string
No overload matches this call.
νλ‘μ νΈμμ Nextλ₯Ό κ°μ Έ μμ next/image
κ°μ Έ μμ λ€μκ³Ό κ°μ΄ λ μ΄μμ μνμ μ¬μ©ν΄λ³΄μμμ€.
<Background src='/img/header.png' quality={100} layout='fill' />
νΈμ§μκ° μΈμνλ μμ μνμ λλ€.
{
"dependencies": {
"next": "10.0.2-canary.4"
}
}
μνμ΄ μλνμ§λ§ νΈμ§μκ° μΈμνμ§ λͺ»ν©λλ€.
λ μλ λ§νλ€ Background
λμ Image
. μλ§λ μλͺ»λ κ΅¬μ± μμλ₯Ό μ¬μ©νκ³ μμ μ μμ΅λλ€.
layout="fill"
μ΄ TSμ (μ) μ λλ‘ μλνλμ§ νμΈνμΌλ©° μ μλ μ 곡ν©λλ€.
import Image from 'next/image'
λ₯Ό μ¬μ©νμ¬ μ¬λ°λ₯Έ κ΅¬μ± μμλ₯Ό κ°μ ΈμμΌν©λλ€.
@styfle μ΄μ μ€νμΌμ΄ μ§μ λ κ΅¬μ± μμμ ν¨κ» μ΄λ―Έμ§ κ΅¬μ± μμλ₯Ό μ¬μ©ν λ λ μ΄μμ μνμ΄ νμλμ§ μμ΅λλ€. κ·Έ μ΄μ λ 무μμ λκΉ?
νμ€ import Image from 'next/image'
μ¬μ©μΌλ‘ μλν©λκΉ?
κ·Έλ λ€λ©΄ styled-components
λ²κ·Έμ²λΌ λ€λ¦½λλ€.
λ¬Έμ λ₯Ό ν΄κ²°νλ κΈ°λ³Έ κ°μ Έ μ€κΈ°μ ν¨κ» μλν©λλ€. κ°μ¬ν©λλ€!
κ°μ₯ μ μ©ν λκΈ
νμ€
import Image from 'next/image'
μ¬μ©μΌλ‘ μλν©λκΉ?κ·Έλ λ€λ©΄
styled-components
λ²κ·Έμ²λΌ λ€λ¦½λλ€.