diff --git a/src/components/ComponentToImg.js b/src/components/ComponentToImg.js index 94b31bf..077ee4c 100644 --- a/src/components/ComponentToImg.js +++ b/src/components/ComponentToImg.js @@ -1,7 +1,7 @@ import React from 'react'; import { exportComponentAsJPEG, exportComponentAsPNG } from "react-component-export-image"; // import CoverImage from './CoverImage' - +import './CoverImage.css' class ComponentToImg extends React.Component { @@ -11,6 +11,8 @@ class ComponentToImg extends React.Component { } render() { + console.log(this.props.children); + return ( @@ -18,12 +20,12 @@ class ComponentToImg extends React.Component { {this.props.children} - + */} ); } diff --git a/src/components/ConfigCover.css b/src/components/ConfigCover.css index 5da5ce0..4584865 100644 --- a/src/components/ConfigCover.css +++ b/src/components/ConfigCover.css @@ -14,7 +14,7 @@ input{margin:4px;} .inputTitle{ height:40px; - width:300px; + width:350px; border-radius:4px; padding-left:20px; } \ No newline at end of file diff --git a/src/components/ConfigCover.js b/src/components/ConfigCover.js index 9ed5829..8fd2717 100644 --- a/src/components/ConfigCover.js +++ b/src/components/ConfigCover.js @@ -8,9 +8,8 @@ class ConfigCover extends React.Component { state = { title: 'How I built my first project with react', bgcolor: '', - bxshadow: '', - height:null, - width:null + border: '' + }; render() { @@ -21,23 +20,23 @@ class ConfigCover extends React.Component { this.setState({ title: e.target.value })}> -
+ {/*
this.setState({width: e.target.value})}> this.setState({height: e.target.value})}> -
+
*/} this.setState({ bgcolor: e.target.value })} /> - + this.setState({ bxshadow: e.target.value })} /> + onChange={e => this.setState({ border: e.target.value })} /> @@ -47,9 +46,8 @@ class ConfigCover extends React.Component { title={this.state.title} bgcolor={this.state.bgcolor} -bxshadow={this.state.bxshadow} -height={this.state.height} -width={this.state.width} +border={this.state.border} + /> diff --git a/src/components/CoverImage.css b/src/components/CoverImage.css index 017a251..de14ce6 100644 --- a/src/components/CoverImage.css +++ b/src/components/CoverImage.css @@ -1,38 +1,33 @@ -.container{ - margin:auto; - justify-content: center; - align-items: center; - overflow: hidden; - -} .cover{ - /* width:800px; - height:420px; */ background-color: #c5a8ff; text-align: center; - position:relative; + justify-content: center; + align-items: center; + height:420px; + width:800px; + padding:90px; } .card{ - height:auto; - width:auto; + border-radius: 10px; - margin:50px; background-color: #ffffff; - display:inline-block; - /* box-shadow: 10px 10px #8c52ff; */ -position:relative; text-align: center; color:#676683; - border:none; justify-content: center; align-items: center; vertical-align: middle; padding:50px; + } h1{height:auto;} - +button{background-color: #8c52ff; +color:#ffffff; +border:none; +border-radius:4px; +padding:10px; +margin:20px;} diff --git a/src/components/CoverImage.js b/src/components/CoverImage.js index 31fbb2d..1db5b7b 100644 --- a/src/components/CoverImage.js +++ b/src/components/CoverImage.js @@ -7,15 +7,14 @@ class CoverImage extends React.Component { render() { return ( -
-
+
+ style={{ borderTop: `15px solid ${this.props.border}`}}>

{this.props.title}

-
+ ); }