Permalink
Browse files

Add a fucking component shit

  • Loading branch information...
CharlyJazz committed Jan 10, 2018
1 parent 54fdfc4 commit b6882e66c95d0c649884490693fad049ee022ef6
View
@@ -1,5 +1,6 @@
import React, { Component } from 'react';
import { Route, withRouter, Redirect } from 'react-router-dom';
import ContactContainer from './containers/Contact/Contact';
import WorksContainer from './containers/Works/Works';
import HomeContainer from './containers/Home/Home';
@@ -12,13 +13,13 @@ class App extends Component {
return (
<React.Fragment>
<Layout>
<CustomAnimatedSwitch>
{ /* <CustomAnimatedSwitch> */ }
<Route path="/" exact component={HomeContainer} />
<Route path="/works" exact component={WorksContainer} />
<Route path="/about" exact component={AboutContainer} />
<Route path="/contact" exact component={ContactContainer} />
<Redirect to="/" />
</CustomAnimatedSwitch>
{ /* </CustomAnimatedSwitch> */ }
</Layout>
</React.Fragment>
);
@@ -0,0 +1,9 @@
import React from 'react';
const button = props => {
return (
<button>{props.children}</button>
)
}
export default button;
No changes.
@@ -0,0 +1,36 @@
import React, { Component } from 'react';
import classes from './ContactBox.css';
import Button from './Button/Button';
class ContactBox extends Component {
render() {
return (
<div>
<div>
<p>Pawia 5, 31-154 Kraków, Poland</p>
<a href="mailto:ouremail@gmail.com">ouremail@gmail.com</a>
<a href="tel:+148126287560">+48 12 628 75 60</a>
</div>
<ul>
<li>
<Button>
<a href="#0">Bēhance</a>
</Button>
</li>
<li>
<Button>
<a href="#0">dribbble</a>
</Button>
</li>
<li>
<Button>
<a href="mailto:ouremail@gmail.com">Contact Us</a>
</Button>
</li>
</ul>
</div>
)
}
}
export default ContactBox;
@@ -0,0 +1,21 @@
import React from 'react';
import { configure, shallow } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import Button from './Button/Button';
import ContactBox from './ContactBox';
configure({adapter: new Adapter()})
describe('<ContactBox />', () => {
let wrapper;
beforeEach(() => {
wrapper = shallow(<ContactBox />)
})
it('Have 3 <Button />', () => {
expect(wrapper.find(Button).length).toBe(3)
})
})
@@ -0,0 +1,4 @@
.Contact {
height: 60vh;
margin-top: 6em
}
@@ -1,14 +1,20 @@
import React, { Component } from 'react';
// import { Container, Row, Col } from 'react-grid-system';
// import classes from './Contact.css';
import { Container, Row, Col } from 'react-grid-system';
import ContactBox from '../../components/ContactBox/ContactBox';
import classes from './Contact.css';
class ContactContainer extends Component {
render() {
return (
<React.Fragment>
Level 04 Contact
</React.Fragment>
)
return (
<Container fluid className={classes.Contact}>
<Row align="end">
<Col md={4} offset={{ md: 8 }} debug>
<ContactBox/>
</Col>
</Row>
</Container>
)
}
}

0 comments on commit b6882e6

Please sign in to comment.