-
-
Notifications
You must be signed in to change notification settings - Fork 76
finish #45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
yakksiek
wants to merge
5
commits into
devmentor-pl:master
Choose a base branch
from
yakksiek:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
finish #45
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| node_modules/ | ||
| build/ | ||
| package-lock.json | ||
| package-lock.json | ||
| .lh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,20 +1,40 @@ | ||
| import React from 'react'; | ||
| import { ThemeProvider, css } from 'styled-components'; | ||
|
|
||
| import Alert from './../src/components/Alert'; | ||
| import { Row, Col, Alert as RBAlert } from 'react-bootstrap'; | ||
|
|
||
| // czy używanie css zamiast obiektu różni się czymś więcej niż tylko łatwością zapisu? | ||
| const themeSettings = { | ||
| primary: css` | ||
| background-color: #3cb371; | ||
| color: #0c2518; | ||
| border: 1px solid #2f8d59; | ||
| `, | ||
| secondary: css` | ||
| background-color: #add8e6; | ||
| color: darkblue; | ||
| border: 1px solid #86c5da; | ||
| `, | ||
| }; | ||
|
|
||
| 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> | ||
| <ThemeProvider theme={themeSettings}> | ||
| <Alert variant='secondary'> | ||
| Uwaga! <em>Styled Components</em> nadchodzi! | ||
| </Alert> | ||
| </ThemeProvider> | ||
| </Col> | ||
| </Row> | ||
| ) | ||
| } | ||
| ); | ||
| }; | ||
|
|
||
| export default Task01; | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,20 +1,26 @@ | ||
| import React from 'react'; | ||
| import { ThemeProvider } from 'styled-components'; | ||
|
|
||
| import Button from './../src/components/Button'; | ||
| import { Row, Col, Button as RBButton } from 'react-bootstrap'; | ||
|
|
||
| import buttonThemeSettings from '../src/components/Button/buttonThemeSettings.js'; | ||
|
|
||
| const Task02 = () => { | ||
| return ( | ||
| <Row> | ||
| <Col> | ||
| <RBButton variant="primary" size="lg">Button!</RBButton> | ||
| <RBButton variant='primary' size='sm'> | ||
| Button! | ||
| </RBButton> | ||
| </Col> | ||
| <Col> | ||
| Button! | ||
| <ThemeProvider theme={buttonThemeSettings}> | ||
| <Button value='Button!' variant='secondary' size='sm' /> | ||
| </ThemeProvider> | ||
| </Col> | ||
| </Row> | ||
| ) | ||
| } | ||
| ); | ||
| }; | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
|
|
||
| export default Task02; | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,25 +1,31 @@ | ||
| import React from 'react'; | ||
|
|
||
| import { Row, Col, Breadcrumb as RBBreadcrumb } from 'react-bootstrap'; | ||
| import Breadcrumb from '../src/components/Breadcumb'; | ||
|
|
||
| const Task03 = () => { | ||
| return ( | ||
| <Row> | ||
| <Col> | ||
| <RBBreadcrumb> | ||
| <RBBreadcrumb.Item href="#">Home</RBBreadcrumb.Item> | ||
| <RBBreadcrumb.Item href="https://getbootstrap.com/docs/4.0/components/breadcrumb/"> | ||
| <RBBreadcrumb.Item href='#'>Home</RBBreadcrumb.Item> | ||
| <RBBreadcrumb.Item href='https://getbootstrap.com/docs/4.0/components/breadcrumb/'> | ||
| Library | ||
| </RBBreadcrumb.Item> | ||
| <RBBreadcrumb.Item active>Data</RBBreadcrumb.Item> | ||
| </RBBreadcrumb> | ||
| </Col> | ||
| <Col> | ||
| Breadcrumb! | ||
| <Breadcrumb> | ||
| <Breadcrumb.Item href='#'>Home</Breadcrumb.Item> | ||
| <Breadcrumb.Item href='#'>Library</Breadcrumb.Item> | ||
| <Breadcrumb.Item href='#' active> | ||
| Data | ||
| </Breadcrumb.Item> | ||
| </Breadcrumb> | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
| </Col> | ||
| </Row> | ||
| ) | ||
| } | ||
| ); | ||
| }; | ||
|
|
||
| export default Task03; | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,29 +1,65 @@ | ||
| import React from 'react'; | ||
|
|
||
| import { Row, Col, Tabs as RBTabs, Tab as RBTab, } from 'react-bootstrap'; | ||
| import { Row, Col, Tabs as RBTabs, Tab as RBTab } from 'react-bootstrap'; | ||
| import { Tab, Tabs } from '../src/components/Tabs'; | ||
|
|
||
| const Task04 = () => { | ||
| return ( | ||
| <Row> | ||
| <Col> | ||
| <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> | ||
| <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> | ||
| </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> | ||
| <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> | ||
| </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> | ||
| <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> | ||
| </RBTab> | ||
| </RBTabs> | ||
| </Col> | ||
| <Col> | ||
| Tabs! | ||
| <Tabs defaultActiveKey='profile'> | ||
| <Tab 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> | ||
| </Tab> | ||
| <Tab 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> | ||
| </Tab> | ||
| <Tab 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> | ||
| </Tab> | ||
| </Tabs> | ||
| </Col> | ||
| </Row> | ||
| ) | ||
| } | ||
| ); | ||
| }; | ||
|
|
||
| export default Task04; | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,29 +1,40 @@ | ||
| import React from 'react'; | ||
|
|
||
| import { Row, Col, Card as RBCard, Button as RBButton } from 'react-bootstrap'; | ||
| import Card from '../src/components/Card'; | ||
| import Button from '../src/components/Button'; | ||
|
|
||
| const Task05 = () => { | ||
| return ( | ||
| <Row> | ||
| <Col> | ||
| <RBCard style={{ width: '18rem' }}> | ||
| <RBCard.Img variant="top" src="https://picsum.photos/100/80" /> | ||
| <RBCard.Img variant='bottom' 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> | ||
| <RBButton variant='primary'>Go somewhere</RBButton> | ||
| </RBCard.Body> | ||
| </RBCard> | ||
| </Col> | ||
| <Col> | ||
| Card! | ||
| <Card style={{ width: '18rem' }}> | ||
| <Card.Img src='https://picsum.photos/100/80' alt='random photo' /> | ||
| <Card.Body> | ||
| <Card.Title>Card Title</Card.Title> | ||
| <Card.Text> | ||
| Some quick example text to build on the card title and make up the bulk of the card's | ||
| content. | ||
| </Card.Text> | ||
| <Button value='Go somewhere' variant='secondary' /> | ||
| </Card.Body> | ||
| </Card> | ||
| </Col> | ||
| </Row> | ||
| ) | ||
| } | ||
| ); | ||
| }; | ||
|
|
||
| export default Task05; | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,32 +1,32 @@ | ||
| { | ||
| "name": "practice-react-styling", | ||
| "version": "1.0.0", | ||
| "description": "", | ||
| "main": "index.js", | ||
| "scripts": { | ||
| "test": "echo \"Error: no test specified\" && exit 1", | ||
| "start": "webpack-dev-server --open", | ||
| "build": "webpack --env.production" | ||
| }, | ||
| "keywords": [], | ||
| "author": "", | ||
| "license": "ISC", | ||
| "devDependencies": { | ||
| "@babel/core": "^7.19.6", | ||
| "@babel/preset-env": "^7.19.4", | ||
| "@babel/preset-react": "^7.18.6", | ||
| "babel-loader": "^9.0.1", | ||
| "babel-plugin-styled-components": "^2.0.7", | ||
| "html-webpack-plugin": "^5.5.0", | ||
| "webpack": "^5.74.0", | ||
| "webpack-cli": "^4.10.0", | ||
| "webpack-dev-server": "^4.11.1" | ||
| }, | ||
| "dependencies": { | ||
| "bootstrap": "^4.4.1", | ||
| "react": "^18.2.0", | ||
| "react-bootstrap": "^1.0.0", | ||
| "react-dom": "^18.2.0", | ||
| "styled-components": "^5.3.6" | ||
| } | ||
| "name": "practice-react-styling", | ||
| "version": "1.0.0", | ||
| "description": "", | ||
| "main": "index.js", | ||
| "scripts": { | ||
| "test": "echo \"Error: no test specified\" && exit 1", | ||
| "start": "webpack-dev-server", | ||
| "build": "webpack --env.production" | ||
| }, | ||
| "keywords": [], | ||
| "author": "", | ||
| "license": "ISC", | ||
| "devDependencies": { | ||
| "@babel/core": "^7.19.6", | ||
| "@babel/preset-env": "^7.19.4", | ||
| "@babel/preset-react": "^7.18.6", | ||
| "babel-loader": "^9.0.1", | ||
| "babel-plugin-styled-components": "^2.0.7", | ||
| "html-webpack-plugin": "^5.5.0", | ||
| "webpack": "^5.74.0", | ||
| "webpack-cli": "^4.10.0", | ||
| "webpack-dev-server": "^4.11.1" | ||
| }, | ||
| "dependencies": { | ||
| "bootstrap": "^4.4.1", | ||
| "react": "^18.2.0", | ||
| "react-bootstrap": "^1.0.0", | ||
| "react-dom": "^18.2.0", | ||
| "styled-components": "^5.3.6" | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,11 @@ | ||
| import styled from 'styled-components'; | ||
|
|
||
| const StyledAlert = styled.div` | ||
| const DefaultStyledAlert = styled.div` | ||
| display: block; | ||
| ` | ||
| padding: 0.75rem 1.25rem; | ||
| border-radius: 0.25rem; | ||
| `; | ||
|
|
||
| export { StyledAlert }; | ||
| const StyledAlert = styled(DefaultStyledAlert)(({ theme, variant }) => theme[variant]); | ||
|
|
||
| export { StyledAlert }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 { 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 GlobalStyle from '../styled/Global'; | ||
| import buttonThemeSettings from './Button/buttonThemeSettings'; | ||
|
|
||
| const App = () => { | ||
| return ( | ||
| <> | ||
| <GlobalStyle /> | ||
| <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 /> | ||
| <ThemeProvider theme={buttonThemeSettings}> | ||
| <Task05 /> | ||
| </ThemeProvider> | ||
| </Container> | ||
| </> | ||
| ) | ||
| } | ||
| ); | ||
| }; | ||
|
|
||
| export default App; | ||
| export default App; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Na chwilę obecną nie przychodzi mi nic do głowy.
Chociaż zapis, który jest poniżej może być mniej optymalny pod względem szybkości działania (ale tylko po stronie develpmentu bo potem i tak wszystko webpack zamienia więc nie ma co się przejmować)