Added Image Component

Signed-off-by: Avior <florian.bouillon@delta-wings.net>
This commit is contained in:
2020-03-31 11:14:53 +02:00
parent f5cdda822c
commit e37dc1a178
4 changed files with 261 additions and 6 deletions

View File

@@ -4,7 +4,7 @@ import React from 'react'
import '../styl/index.styl'
export default class Index extends App {
export default class CApp extends App {
public render() {
const { Component, pageProps } = this.props

View File

@@ -1,16 +1,21 @@
import React from 'react'
import '../styl/index.styl'
import HelloWorld from '../components/HelloWorld'
import Image from '../components/Image'
export default class Index extends React.Component {
public render() {
return(
<>
<h1>Hello World !</h1>
<style jsx>{`
h1
font-size: 39px
`}</style>
<HelloWorld>Hello World</HelloWorld>
<Image
max={{height:400,width:200}}
default={{width:200,height:100}}
deleteOnError={true}
src="https://source.unusplash.com/random/800x600"
/>
<HelloWorld>Hello World</HelloWorld>
</>
)
}