Skip to content

Commit a29c421

Browse files
committed
update
1 parent 5d747f6 commit a29c421

9 files changed

+4211
-8152
lines changed

dist/bundle.js

+236-119
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/example-dev.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
* @see docs/installation.md for mode details
7777
*/
7878
var editor = new EditorJS({
79-
readOnly: false,
79+
readOnly: true,
8080
/**
8181
* Wrapper of Editor
8282
*/

package-lock.json

+3,944
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+12-12
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,8 @@
1717
},
1818
"author": "kaaaaaaaaaaai <[email protected]>",
1919
"devDependencies": {
20-
"@babel/core": "^7.10.2",
21-
"@babel/preset-env": "^7.10.2",
22-
"@editorjs/editorjs": "^2.19.1",
23-
"babel-loader": "^8.1.0",
2420
"cross-env": "^7.0.3",
25-
"css-loader": "^3.5.3",
26-
"raw-loader": "^4.0.1",
27-
"sass": "^1.30.0",
28-
"sass-loader": "^10.1.0",
29-
"style-loader": "^1.2.1",
30-
"webpack": "^4.43.0",
31-
"webpack-cli": "^3.3.11"
21+
"raw-loader": "^4.0.1"
3222
},
3323
"bugs": {
3424
"url": "https://github.com/kaaaaaaaaaaai/editorjs-button/issues"
@@ -37,9 +27,19 @@
3727
"directories": {
3828
"example": "example"
3929
},
40-
"dependencies": {},
4130
"repository": {
4231
"type": "git",
4332
"url": "git+https://github.com/kaaaaaaaaaaai/editorjs-button.git"
33+
},
34+
"dependencies": {
35+
"@babel/core": "^7.24.4",
36+
"@babel/preset-env": "^7.24.4",
37+
"babel-loader": "^9.1.3",
38+
"css-loader": "^7.1.1",
39+
"sass": "^1.75.0",
40+
"sass-loader": "^14.2.1",
41+
"style-loader": "^4.0.0",
42+
"webpack": "^5.91.0",
43+
"webpack-cli": "^5.1.4"
4444
}
4545
}

src/index.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import css from './index.css';
1+
import css from './index.scss';
22

33
export default class AnyButton {
4-
54
/**
65
*
76
* @returns {{icon: string, title: string}}
@@ -117,7 +116,7 @@ export default class AnyButton {
117116
const _CSS = {
118117
baseClass: this.api.styles.block,
119118
hide: "hide",
120-
btn: "btn",
119+
btn: "anyButton__btn",
121120
container: "anyButtonContainer",
122121
input: "anyButtonContainer__input",
123122

@@ -126,7 +125,7 @@ export default class AnyButton {
126125
inputLink: "anyButtonContainer__input--link",
127126
registButton: "anyButtonContainer__registerButton",
128127
anyButtonHolder: "anyButtonContainer__anyButtonHolder",
129-
btnColor: "btn--default",
128+
btnColor: "anyButton__btn--default",
130129
toggleSwitch: "toggle-switch",
131130
toggleInput: "toggle-input",
132131
toggleLabel: "toggle-label",

src/index.css src/index.scss

+12-11
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959

6060

6161

62-
.btn{
62+
.anyButton__btn{
6363
display: inline-block;
6464
font-weight: 400;
6565
line-height: 1.5;
@@ -77,21 +77,22 @@
7777
font-size: 1rem;
7878
border-radius: .25rem;
7979
transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;
80-
}
8180

82-
.btn--default{
83-
color: #fff;
84-
background-color: #0d6efd;
85-
border-color: #0d6efd;
86-
}
81+
&--default{
82+
color: #fff;
83+
background-color: #0d6efd;
84+
border-color: #0d6efd;
85+
}
8786

88-
.btn--gray{
89-
color: #fff;
90-
background-color: #7c7c7c;
91-
border-color: #7c7c7c;
87+
&--gray{
88+
color: #fff;
89+
background-color: #7c7c7c;
90+
border-color: #7c7c7c;
91+
}
9292
}
9393

9494

95+
9596
.toggle-input {
9697
position: absolute;
9798
z-index: 5;

webpack.config.js

+3-6
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,15 @@ module.exports = {
1010
use: [
1111
{
1212
loader: 'babel-loader',
13-
query: {
13+
options: {
1414
presets: [ '@babel/preset-env' ],
1515
},
1616
},
1717
]
1818
},
1919
{
20-
test: /\.css$/,
21-
use: [
22-
'style-loader',
23-
'css-loader'
24-
]
20+
test: /\.scss$/,
21+
use: ["style-loader", "css-loader", "sass-loader"]
2522
},
2623
{
2724
test: /\.(svg)$/,

0 commit comments

Comments
 (0)