Skip to content

Commit a6b198f

Browse files
authored
Merge pull request #4 from worksolutions/refactoring_styles
Рефакторинг стилей
2 parents 1d04e2e + be1962f commit a6b198f

File tree

12 files changed

+118
-105
lines changed

12 files changed

+118
-105
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ npm i @worksolutions/antd-react-components
1515

1616
```bash
1717
@import 'antd/dist/reset.css';
18-
@import "@worksolutions/antd-react-components/dist/aliases";
18+
@import "@worksolutions/antd-react-components/dist/styles.css";
1919
```

package-lock.json

Lines changed: 30 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@
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 && cp **/**/**/**/*.scss dist",
11+
"build": "rm -rf dist && cross-env NODE_ENV=production && npm run build:babel && npm run build:ts && npm run build:styles",
1212
"build:babel": "babel src -d dist --extensions '.ts,.tsx,.js,.jsx' --source-maps",
13-
"build:ts": "node_modules/typescript/bin/tsc"
13+
"build:ts": "node_modules/typescript/bin/tsc",
14+
"build:styles": "node_modules/sass/sass.js src/shared/ui/styles/index.scss dist/styles.css"
1415
},
1516
"author": "Gevorg Danelyan",
1617
"license": "ISC",
@@ -44,6 +45,7 @@
4445
"dependencies": {
4546
"react": "^18.2.0",
4647
"reflect-metadata": "^0.1.13",
48+
"sass": "^1.64.2",
4749
"typedi": "^0.10.0"
4850
}
4951
}

src/shared/ui/styles/aliases.scss

Lines changed: 0 additions & 81 deletions
This file was deleted.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.borderR {
2+
border-right: 1px solid;
3+
}
4+
5+
.borderB {
6+
border-bottom: 1px solid;
7+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
.block {
2+
display: block;
3+
}
4+
5+
.fullWidth {
6+
width: 100%;
7+
}
8+
9+
.halfWidth {
10+
width: 50%;
11+
}
12+
13+
.fullHeight {
14+
height: 100%;
15+
}
16+
17+
.heightAuto {
18+
height: auto;
19+
}
20+
21+
.fitContentWidth {
22+
width: fit-content;
23+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.defaultCursor {
2+
cursor: default;
3+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
.flex {
2+
display: flex;
3+
}
4+
5+
.fdColumn {
6+
flex-direction: column;
7+
}
8+
9+
.aiEnd {
10+
align-items: flex-end;
11+
}
12+
13+
.aiCenter {
14+
align-items: center;
15+
}
16+
17+
.jcCenter {
18+
justify-content: center;
19+
}
20+
21+
.jcBetween {
22+
justify-content: space-between;
23+
}
24+
25+
.heightHack {
26+
height: 0;
27+
flex: 1;
28+
}
29+
30+
.widthHack {
31+
width: 0;
32+
flex: 1;
33+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
@import "typography";
2+
@import "border";
3+
@import "flex";
4+
@import "space";
5+
@import "cursor";
6+
@import "box";
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.resetPadding {
2+
padding: 0;
3+
}
4+
5+
.resetMargin {
6+
margin: 0;
7+
}

0 commit comments

Comments
 (0)