Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions 01/Task01.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
import React from 'react';
import React from "react";

import Alert from './../src/components/Alert';
import { Row, Col, Alert as RBAlert } from 'react-bootstrap';
import Alert from "./../src/components/Alert/";
import { Row, Col, Alert as RBAlert } from "react-bootstrap";

const Task01 = () => {
return (
<Row>
<Col>
<RBAlert variant="primary">Uwaga! <em>Styled Components</em> nadchodzi!</RBAlert>
<RBAlert variant="primary">
Uwaga! <em>Styled Components</em> nadchodzi!
</RBAlert>
</Col>
<Col>
<Alert>Uwaga! <em>Styled Components</em> nadchodzi!</Alert>
<Alert>
Uwaga! <em>Styled Components</em> nadchodzi!
</Alert>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

</Col>
</Row>
)
}
);
};

export default Task01;

19 changes: 11 additions & 8 deletions 02/Task02.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
import React from 'react';
import React from "react";

import Button from './../src/components/Button';
import { Row, Col, Button as RBButton } from 'react-bootstrap';
import Button from "./../src/components/Button";
import { Row, Col, Button as RBButton } from "react-bootstrap";

const Task02 = () => {
return (
<Row>
<Col>
<RBButton variant="primary" size="lg">Button!</RBButton>
<RBButton variant="primary" size="lg">
Button!
</RBButton>
</Col>
<Col>
Button!
<Button variant="secondary" size="lg">
Button!
</Button>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

</Col>
</Row>
)
}
);
};

export default Task02;

18 changes: 12 additions & 6 deletions 03/Task03.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';
import React from "react";

import { Row, Col, Breadcrumb as RBBreadcrumb } from 'react-bootstrap';
import { Row, Col, Breadcrumb as RBBreadcrumb } from "react-bootstrap";
import Breadcrumb from "../src/components/Breadcrumbs/index";

const Task03 = () => {
return (
Expand All @@ -15,11 +16,16 @@ const Task03 = () => {
</RBBreadcrumb>
</Col>
<Col>
Breadcrumb!
<Breadcrumb>
<Breadcrumb.Item href="#">Home</Breadcrumb.Item>
<Breadcrumb.Item href="https://getbootstrap.com/docs/4.0/components/breadcrumb/">
Library
</Breadcrumb.Item>
<Breadcrumb.Item active>Data</Breadcrumb.Item>
</Breadcrumb>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

</Col>
</Row>
)
}
);
};

export default Task03;

75 changes: 63 additions & 12 deletions 04/Task04.js
Original file line number Diff line number Diff line change
@@ -1,29 +1,80 @@
import React from 'react';

import { Row, Col, Tabs as RBTabs, Tab as RBTab, } from 'react-bootstrap';
import React from "react";
import { Tab, Tabs } from "../src/components/Tabs/index";
import { Row, Col, Tabs as RBTabs, Tab as RBTab } from "react-bootstrap";

const Task04 = () => {
return (
<Row>
<Col>
<RBTabs defaultActiveKey="profile" id="uncontrolled-tab-example">
<RBTabs
defaultActiveKey="profile"
id="uncontrolled-tab-example"
>
<RBTab eventKey="home" title="Home">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur condimentum lacus nec ligula faucibus rhoncus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; </p>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing
elit. Curabitur condimentum lacus nec ligula
faucibus rhoncus. Vestibulum ante ipsum primis in
faucibus orci luctus et ultrices posuere cubilia
Curae;{" "}
</p>
</RBTab>
<RBTab eventKey="profile" title="Profile">
<p>Donec dignissim ultricies felis, eu dictum eros congue in. In gravida lobortis libero nec tempus. Cras rutrum nisl ut leo volutpat rhoncus. Nulla massa nulla, viverra hendrerit laoreet at, tincidunt eu lacus.</p>
<p>
Donec dignissim ultricies felis, eu dictum eros
congue in. In gravida lobortis libero nec tempus.
Cras rutrum nisl ut leo volutpat rhoncus. Nulla
massa nulla, viverra hendrerit laoreet at, tincidunt
eu lacus.
</p>
</RBTab>
<RBTab eventKey="contact" title="Contact" disabled>
<p>Vivamus metus nulla, fermentum eget placerat vitae, mollis interdum elit. Pellentesque arcu augue, vulputate ut porttitor ut, suscipit non orci. Integer justo odio, suscipit eget tortor nec, molestie lobortis eros. Nullam commodo elit sit amet lacus blandit aliquet. Mauris at nibh eget nisl pulvinar dignissim.</p>
<p>
Vivamus metus nulla, fermentum eget placerat vitae,
mollis interdum elit. Pellentesque arcu augue,
vulputate ut porttitor ut, suscipit non orci.
Integer justo odio, suscipit eget tortor nec,
molestie lobortis eros. Nullam commodo elit sit amet
lacus blandit aliquet. Mauris at nibh eget nisl
pulvinar dignissim.
</p>
</RBTab>
</RBTabs>
</Col>
<Col>
Tabs!
<Tabs>
<Tab label="Home">
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing
elit. Curabitur condimentum lacus nec ligula
faucibus rhoncus. Vestibulum ante ipsum primis in
faucibus orci luctus et ultrices posuere cubilia
Curae;{" "}
</p>
</Tab>
<Tab label="Profile" active>
<p>
Donec dignissim ultricies felis, eu dictum eros
congue in. In gravida lobortis libero nec tempus.
Cras rutrum nisl ut leo volutpat rhoncus. Nulla
massa nulla, viverra hendrerit laoreet at, tincidunt
eu lacus.
</p>
</Tab>
<Tab label="Contact" disabled>
<p>
Vivamus metus nulla, fermentum eget placerat vitae,
mollis interdum elit. Pellentesque arcu augue,
vulputate ut porttitor ut, suscipit non orci.
Integer justo odio, suscipit eget tortor nec,
molestie lobortis eros. Nullam commodo elit sit amet
lacus blandit aliquet. Mauris at nibh eget nisl
pulvinar dignissim.
</p>
</Tab>
</Tabs>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

</Col>
</Row>
)
}

);
};
export default Task04;

24 changes: 13 additions & 11 deletions 05/Task05.js
Original file line number Diff line number Diff line change
@@ -1,29 +1,31 @@
import React from 'react';

import { Row, Col, Card as RBCard, Button as RBButton } from 'react-bootstrap';
import React from "react";

import { Row, Col, Card as RBCard, Button as RBButton } from "react-bootstrap";
import Card from "../src/components/Card/index";
const Task05 = () => {
return (
<Row>
<Col>
<RBCard style={{ width: '18rem' }}>
<RBCard.Img variant="top" src="https://picsum.photos/100/80" />
<RBCard style={{ width: "18rem" }}>
<RBCard.Img
variant="top"
src="https://picsum.photos/100/80"
/>
<RBCard.Body>
<RBCard.Title>Card Title</RBCard.Title>
<RBCard.Text>
Some quick example text to build on the card title and make up the bulk of
the card's content.
Some quick example text to build on the card title
and make up the bulk of the card's content.
</RBCard.Text>
<RBButton variant="primary">Go somewhere</RBButton>
</RBCard.Body>
</RBCard>
</Col>
<Col>
Card!
<Card />
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

</Col>
</Row>
)
}
);
};

export default Task05;

14 changes: 6 additions & 8 deletions src/components/Alert/Alert.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import React from 'react';
import React from "react";

import { StyledAlert } from './Alert.styled';
import { StyledAlert } from "./Alert.styled";

const Alert = props => {
return (
<StyledAlert>{props.children}</StyledAlert>
);
}
const Alert = ({ variant, children }) => {
return <StyledAlert variant={variant}>{children}</StyledAlert>;
};

export default Alert;
export default Alert;
20 changes: 16 additions & 4 deletions src/components/Alert/Alert.styled.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
import styled from 'styled-components';
import styled from "styled-components";

const StyledAlert = styled.div`
display: block;
`
padding: 0.75rem 1.25rem;

export { StyledAlert };
margin-bottom: 1rem;

border: 1px solid transparent;

border-radius: 0.25rem;

color: #004085;

background-color: ${(props) => props.theme[props.variant] || "#031633"};

border-color: ${(props) => props.theme[props.variant] || "#6ea8fe"};
`;

export { StyledAlert };
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

5 changes: 2 additions & 3 deletions src/components/Alert/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import Alert from './Alert';
import Alert from "./Alert";


export default Alert;
export default Alert;
42 changes: 24 additions & 18 deletions src/components/App.js
Original file line number Diff line number Diff line change
@@ -1,32 +1,38 @@
import React from 'react';
import { Container, Row, Col } from 'react-bootstrap';
import React from "react";
import { Container, Row, Col } from "react-bootstrap";
import { ThemeProvider } from "styled-components";

import Task01 from './../../01/Task01';
import Task02 from './../../02/Task02';
import Task03 from './../../03/Task03';
import Task04 from './../../04/Task04';
import Task05 from './../../05/Task05';
import Task01 from "./../../01/Task01";
import Task02 from "./../../02/Task02";
import Task03 from "./../../03/Task03";
import Task04 from "./../../04/Task04";
import Task05 from "./../../05/Task05";

const theme = {
primary: "#007bff",
secondary: "#6c757d",
};

const App = () => {
return (
<>
<ThemeProvider theme={theme}>
<Container fluid>
<Row>
<Col>
<h2>Komponenty React Boostrap</h2></Col>
<h2>Komponenty React Boostrap</h2>
</Col>
<Col>
<h2>Komponenty Twoje</h2>
</Col>
</Row>
<Task01/>
<Task02/>
<Task03/>
<Task04/>
<Task05/>
<Task01 />
<Task02 />
<Task03 />
<Task04 />
<Task05 />
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

</Container>
</>
)
}
</ThemeProvider>
);
};

export default App;
export default App;
15 changes: 15 additions & 0 deletions src/components/Breadcrumbs/Breadcrumb.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import React from "react";
import { StyledBreadcrumb } from "./Breadcrumb.styled";
import BreadcrumbItem from "./BreadcrumbItem";

const Breadcrumb = ({ children }) => {
return (
<StyledBreadcrumb aria-label="breadcrumb">
<ol>{children}</ol>
</StyledBreadcrumb>
);
};

Breadcrumb.Item = BreadcrumbItem;

export default Breadcrumb;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

15 changes: 15 additions & 0 deletions src/components/Breadcrumbs/Breadcrumb.styled.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import styled from "styled-components";

const StyledBreadcrumb = styled.ol`
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
padding: 0.75rem 0;
margin-bottom: 1rem;
list-style: none;
background-color: #444950;
border-radius: 0.25rem;
justify-content: flex-start;
`;

export { StyledBreadcrumb };
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

12 changes: 12 additions & 0 deletions src/components/Breadcrumbs/BreadcrumbItem.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React from "react";
import { StyledBreadcrumbItem } from "./BreadcrumbItem.styled";

const BreadcrumbItem = ({ href, active, children }) => {
return (
<StyledBreadcrumbItem active={active}>
{href ? <a href={href}>{children}</a> : children}
</StyledBreadcrumbItem>
);
};

export default BreadcrumbItem;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Loading