Skip to content

Commit

Permalink
Merge pull request #18 from Maxxnikitin/maxx/fix-components-styles
Browse files Browse the repository at this point in the history
feat(architecture): fix styles of components, add ConstructorElement
  • Loading branch information
yandex-praktikum authored Apr 30, 2021
2 parents 362ce59 + 7b16776 commit 57de534
Show file tree
Hide file tree
Showing 20 changed files with 481 additions and 22 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
.env.test.local
.env.production.local

.docz
docs
dist
/src/**/*.js

npm-debug.log*
yarn-debug.log*
yarn-error.log*
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,10 @@
npm install @ya.praktikum/react-developer-burger-ui-components
```

## Пример импорта компонента
```
import { Tab } from '@ya.praktikum/react-developer-burger-ui-components'
```

## Документация
Интерактивная документация находится [здесь](https://yandex-praktikum.github.io/react-developer-burger-ui-components/docs/)
28 changes: 28 additions & 0 deletions src/__docz__/constructor-element.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: ConstructorElement
route: /constructor-element
---
import { Playground, Props } from 'docz'
import { ConstructorElement } from '../';
import img from '../images/img.png';


# ConstructorElement

## Properties

<Props of={ConstructorElement} />

## Basic usage

<Playground>
{() => {
return (
<div style={{ display: 'flex', flexDirection: 'column', gap: '10px'}}>
<ConstructorElement type='top' isLocked={true} text='Краторная булка N-200i (верх)' price={200} thumbnail={img} />
<ConstructorElement text='Краторная булка N-200i (верх)' price={50} thumbnail={img} />
<ConstructorElement type='bottom' isLocked={true} text='Краторная булка N-200i (низ)' price={200} thumbnail={img} />
</div>
)
}}
</Playground>
24 changes: 21 additions & 3 deletions src/__docz__/icons.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ import {
BurgerIcon,
LockIcon,
DragIcon,
DeleteIcon,
ArrowUpIcon,
ArrowDownIcon,
MenuIcon,
CloseIcon,
ListIcon,
ProfileIcon,
Expand All @@ -18,7 +22,7 @@ import {
HideIcon,
LogoutIcon,
CheckMarkIcon,
} from '../'
} from '../ui/icons'


# Icons
Expand All @@ -44,6 +48,10 @@ import {
<ShowIcon type="primary" />
<HideIcon type="primary" />
<LogoutIcon type="primary" />
<DeleteIcon type="primary" />
<ArrowUpIcon type="primary" />
<ArrowDownIcon type="primary" />
<MenuIcon type="primary" />
</div>
<div>
<CurrencyIcon type="secondary" />
Expand All @@ -59,6 +67,10 @@ import {
<ShowIcon type="secondary" />
<HideIcon type="secondary" />
<LogoutIcon type="secondary" />
<DeleteIcon type="secondary" />
<ArrowUpIcon type="secondary" />
<ArrowDownIcon type="secondary" />
<MenuIcon type="secondary" />
</div>
<div>
<CurrencyIcon type="error" />
Expand All @@ -74,6 +86,10 @@ import {
<ShowIcon type="error" />
<HideIcon type="error" />
<LogoutIcon type="error" />
<DeleteIcon type="error" />
<ArrowUpIcon type="error" />
<ArrowDownIcon type="error" />
<MenuIcon type="error" />
</div>
<div>
<CurrencyIcon type="success" />
Expand All @@ -89,7 +105,9 @@ import {
<ShowIcon type="success" />
<HideIcon type="success" />
<LogoutIcon type="success" />
<DeleteIcon type="success" />
<ArrowUpIcon type="success" />
<ArrowDownIcon type="success" />
<MenuIcon type="success" />
</div>
</Playground>


13 changes: 13 additions & 0 deletions src/__docz__/typography.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,25 @@ import { Input } from '../';
<p className="text text_type_main-small">The quick brown fox jumps over the lazy dog.</p>
</Playground>

## Text inactive color

<Playground>
<p className="text text_type_main-default text_color_inactive">The quick brown fox jumps over the lazy dog.</p>
</Playground>


## Digits default

<Playground>
<p className="text text_type_digits-default">1234567890</p>
</Playground>

## Digits medium

<Playground>
<p className="text text_type_digits-medium">1234567890</p>
</Playground>

## Digits large

<Playground>
Expand Down
Binary file added src/images/img.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 57de534

Please sign in to comment.