Skip to content

Commit 8bae19e

Browse files
authored
Merge pull request #1 from worksolutions/add_style_aliases
Добавлены алиасы на стили
2 parents da053ed + a2be816 commit 8bae19e

File tree

3 files changed

+87
-1
lines changed

3 files changed

+87
-1
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,13 @@
77

88
```bash
99
npm i @worksolutions/antd-react-components
10+
```
11+
12+
#### Подключение стилей
13+
14+
Чтобы подключить стилизацию, добавьте следующий код в основной scss файл вашего проекта.
15+
16+
```bash
17+
@import 'antd/dist/reset.css';
18+
@import "@worksolutions/antd-react-components/dist/aliases";
1019
```

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"publish:patch": "npm run build && npm version patch && npm publish",
99
"publish:minor": "npm run build && npm version minor && npm publish",
1010
"publish:major": "npm run build && npm version major && npm publish",
11-
"build": "rm -rf dist && cross-env NODE_ENV=production && npm run build:babel && npm run build:ts",
11+
"build": "rm -rf dist && cross-env NODE_ENV=production && npm run build:babel && npm run build:ts && cp **/**/**/**/*.scss dist",
1212
"build:babel": "babel src -d dist --extensions '.ts,.tsx,.js,.jsx' --source-maps",
1313
"build:ts": "node_modules/typescript/bin/tsc"
1414
},

src/shared/ui/styles/aliases.scss

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
.block{
2+
display: block;
3+
}
4+
5+
.textAlignLeft{
6+
text-align: left
7+
}
8+
9+
.fullWidth {
10+
width: 100%;
11+
}
12+
13+
.halfWidth{
14+
width: 50%;
15+
}
16+
17+
.fullHeight {
18+
height: 100%;
19+
}
20+
21+
.heightAuto {
22+
height: auto;
23+
}
24+
25+
.heightHack {
26+
height: 0;
27+
flex: 1;
28+
}
29+
30+
.widthHack {
31+
width: 0;
32+
flex: 1;
33+
}
34+
35+
.fitContentWidth{
36+
width: fit-content;
37+
}
38+
39+
.resetPadding {
40+
padding: 0;
41+
}
42+
43+
.resetMargin {
44+
margin: 0;
45+
}
46+
47+
.flex {
48+
display: flex;
49+
}
50+
51+
.fdColumn {
52+
flex-direction: column;
53+
}
54+
55+
.aiEnd {
56+
align-items: flex-end;
57+
}
58+
59+
.aiCenter {
60+
align-items: center;
61+
}
62+
63+
.jcCenter {
64+
justify-content: center;
65+
}
66+
67+
.jcBetween {
68+
justify-content: space-between;
69+
}
70+
71+
.borderR {
72+
border-right: 1px solid;
73+
}
74+
75+
.borderB {
76+
border-bottom: 1px solid;
77+
}

0 commit comments

Comments
 (0)