Skip to content

Not finished#46

Open
sadkowa wants to merge 7 commits intodevmentor-pl:masterfrom
sadkowa:master
Open

Not finished#46
sadkowa wants to merge 7 commits intodevmentor-pl:masterfrom
sadkowa:master

Conversation

@sadkowa
Copy link

@sadkowa sadkowa commented Sep 21, 2023

No description provided.

Copy link
Owner

@devmentor-pl devmentor-pl left a comment

Choose a reason for hiding this comment

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

Asiu,

Tak jak już pisałem całość prezentuje się bardzo dobrze 👍
Zostawiłem parę uwag w komentarzach i odniosłem się też do a :)

import { Row, Col, Alert as RBAlert } from 'react-bootstrap';

const Task01 = () => {
const themeSettings = {
Copy link
Owner

Choose a reason for hiding this comment

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

Docelowo "theme" definiujemy w osobnym pliku i jest on przekazywany gdzieś na "górze" np. w App.js.
Na potrzeby zadań jest ok, ale w projekcie lepiej to zrobić tak jak piszę wyżej i zazwyczaj jest to jeden plik :)

PS. Wiem, że wygodniej jest trzymać całe deklaracje w motywie, ale lepiej tam trzymać tylko wartości tj. kolor, grubość obramowania itp. :)

Button!
<ThemeProvider theme={themeSettings}>
<Button variant='primary' size='lg' >Button!</Button>
</ThemeProvider>
Copy link
Owner

Choose a reason for hiding this comment

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

👍

<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.

👍

<Button variant="primary">Go somewhere</Button>
</ThemeProvider>
</Card.Body>
</Card>
Copy link
Owner

Choose a reason for hiding this comment

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

👍


export default Object.assign(Breadcrumb, {
Item: BreadcrumbItem,
}) No newline at end of file
Copy link
Owner

Choose a reason for hiding this comment

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

👍


export { StyledButton }


Copy link
Owner

Choose a reason for hiding this comment

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

👍

Body: CardBody,
Title: CardTitle,
Text: CardText,
})
Copy link
Owner

Choose a reason for hiding this comment

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

👍

margin-bottom: 1rem;
`

export { StyledCard, StyledCardImg, StyledCardBody, StyledCardTitle, StyledCardText } No newline at end of file
Copy link
Owner

Choose a reason for hiding this comment

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

👍

import StyledTab from "./Tab.styled";

const Tab = ({ onClick, title, name, active, children, disabled }) => {
return <StyledTab name={name} active={active} onClick={disabled ? () => { } : onClick} title={title} disabled={disabled}>
Copy link
Owner

Choose a reason for hiding this comment

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

Jeśli masz zapis, w którym funkcja faktycznie nic nie robi to można napisać po prostu: onClick={disabled ? null : onClick}
Potwierdzam też, że a nie zalicza się do znaczników, które mają "disabled" - tu wprowadziłęm CIę w błąd, ale już z button będzie działać :P Wtedy wystarczy onClick={onClick}

import StyledTabs from "./Tabs.styled";
import Tab from "./Tab";

const tabsList = [
Copy link
Owner

Choose a reason for hiding this comment

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

Najlepiej wrzucić do osobnego pliku :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments