ost-components 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -12
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@ Storybook https://ostrovok-frontend.s3.amazonaws.com/mrktg/components/index.html
|
|
|
5
5
|
|
|
6
6
|
## Содержание
|
|
7
7
|
- [Подключение компонентов](#подключение-компонентов)
|
|
8
|
-
- [Компоненты Ostrovok (`components/*`)](#компоненты-
|
|
8
|
+
- [Компоненты Ostrovok (`components/*`)](#компоненты-ost-components)
|
|
9
9
|
- [Импорт стилей](#импорт-стилей)
|
|
10
10
|
- [Fluid mode](#fluid-mode)
|
|
11
11
|
- [Публикация пакета](#публикация-пакета)
|
|
@@ -18,9 +18,9 @@ Storybook https://ostrovok-frontend.s3.amazonaws.com/mrktg/components/index.html
|
|
|
18
18
|
Layout.astro:
|
|
19
19
|
```astro
|
|
20
20
|
---
|
|
21
|
-
import { ThemeProvider } from "
|
|
22
|
-
import ostrovokTheme from "
|
|
23
|
-
import "
|
|
21
|
+
import { ThemeProvider } from "ost-components/themes";
|
|
22
|
+
import ostrovokTheme from "ost-components/themes/ostrovok";
|
|
23
|
+
import "ost-components/index.css"; // Импорт всех стилей
|
|
24
24
|
---
|
|
25
25
|
|
|
26
26
|
<html lang="en">
|
|
@@ -33,8 +33,8 @@ import "ostrovok-components/index.css"; // Импорт всех стилей
|
|
|
33
33
|
Header.astro:
|
|
34
34
|
```astro
|
|
35
35
|
---
|
|
36
|
-
import "
|
|
37
|
-
import Header from "
|
|
36
|
+
import "ost-components/components/Header/index.css";
|
|
37
|
+
import Header from "ost-components/components/Header";
|
|
38
38
|
---
|
|
39
39
|
|
|
40
40
|
<Header
|
|
@@ -59,8 +59,8 @@ import Header from "ostrovok-components/components/Header";
|
|
|
59
59
|
Layout.astro:
|
|
60
60
|
```astro
|
|
61
61
|
---
|
|
62
|
-
import { ThemeProvider } from "
|
|
63
|
-
import "
|
|
62
|
+
import { ThemeProvider } from "ost-components/themes/ratehawk";
|
|
63
|
+
import "ost-components/index.css"; // Импорт всех стилей, опционально
|
|
64
64
|
---
|
|
65
65
|
|
|
66
66
|
<html lang="en">
|
|
@@ -74,8 +74,8 @@ Header.astro:
|
|
|
74
74
|
```astro
|
|
75
75
|
---
|
|
76
76
|
// Можно импортировать не все стили, а только нужные
|
|
77
|
-
import "
|
|
78
|
-
import Header from "
|
|
77
|
+
import "ost-components/components/Header/index.css";
|
|
78
|
+
import Header from "ost-components/components/Header";
|
|
79
79
|
---
|
|
80
80
|
|
|
81
81
|
<Header
|
|
@@ -98,12 +98,12 @@ import Header from "ostrovok-components/components/Header";
|
|
|
98
98
|
|
|
99
99
|
### Вариант 1: Импорт всех стилей
|
|
100
100
|
```javascript
|
|
101
|
-
import "
|
|
101
|
+
import "ost-components/index.css";
|
|
102
102
|
```
|
|
103
103
|
|
|
104
104
|
### Вариант 2: Импорт стилей отдельных компонентов
|
|
105
105
|
```javascript
|
|
106
|
-
import "
|
|
106
|
+
import "ost-components/components/Button/index.css";
|
|
107
107
|
```
|
|
108
108
|
|
|
109
109
|
**Важно для SSR:** Импорт CSS файлов необходим для избежания CLS (Cumulative Layout Shift) при серверном рендеринге.
|