Skip to content
This repository was archived by the owner on Jan 2, 2024. It is now read-only.

Commit d488f71

Browse files
committed
(Add) NPM Publisg CodeEditor CSS
1 parent 078258d commit d488f71

File tree

5 files changed

+72
-46
lines changed

5 files changed

+72
-46
lines changed

demo/src/style.css

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -22,50 +22,4 @@ html {
2222
margin: 0;
2323
padding: 0;
2424
}
25-
26-
/* App */
27-
.container {
28-
display: flex;
29-
align-items: center;
30-
justify-content: center;
31-
height: 100%;
32-
width: 100%;
33-
}
34-
35-
.container__content {
36-
width: 440px;
37-
max-width: 100%;
38-
padding: 10px;
39-
text-align: center;
40-
}
41-
42-
.container_editor_area {
43-
tab-size: 4ch;
44-
max-height: 400px;
45-
overflow: auto;
46-
margin: 1.67em 0;
47-
}
48-
49-
.container__editor {
50-
font-size: 12px;
51-
font-variant-ligatures: common-ligatures;
52-
background-color: #fafafa;
53-
border-radius: 3px;
54-
}
55-
56-
.container__editor textarea {
57-
outline: 0;
58-
}
59-
60-
.button {
61-
display: inline-block;
62-
padding: 0 6px;
63-
text-decoration: none;
64-
background: #000;
65-
color: #fff;
66-
}
67-
68-
.button:hover {
69-
background: linear-gradient(45deg, #E42B66, #E2433F);
70-
}
7125

lib/CodeEditor.css

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
2+
/* App */
3+
.container {
4+
display: flex;
5+
align-items: center;
6+
justify-content: center;
7+
height: 100%;
8+
width: 100%;
9+
}
10+
11+
.container__content {
12+
width: 440px;
13+
max-width: 100%;
14+
padding: 10px;
15+
text-align: center;
16+
}
17+
18+
.container_editor_area {
19+
tab-size: 4ch;
20+
max-height: 400px;
21+
overflow: auto;
22+
margin: 1.67em 0;
23+
}
24+
25+
.container__editor {
26+
font-size: 12px;
27+
font-variant-ligatures: common-ligatures;
28+
background-color: #fafafa;
29+
border-radius: 3px;
30+
}
31+
32+
.container__editor textarea {
33+
outline: 0;
34+
}
35+

lib/CodeEditor.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import 'prismjs/components/prism-javascript';
77
import 'prismjs/components/prism-markup';
88
import 'prismjs/components/prism-jsx';
99
import 'prismjs/themes/prism.css';
10+
import './CodeEditor.css';
1011

1112
export function CodeEditor({ InitCode }) {
1213
const IframeData = useContext(IFrameContext);

src/CodeEditor.css

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
2+
/* App */
3+
.container {
4+
display: flex;
5+
align-items: center;
6+
justify-content: center;
7+
height: 100%;
8+
width: 100%;
9+
}
10+
11+
.container__content {
12+
width: 440px;
13+
max-width: 100%;
14+
padding: 10px;
15+
text-align: center;
16+
}
17+
18+
.container_editor_area {
19+
tab-size: 4ch;
20+
max-height: 400px;
21+
overflow: auto;
22+
margin: 1.67em 0;
23+
}
24+
25+
.container__editor {
26+
font-size: 12px;
27+
font-variant-ligatures: common-ligatures;
28+
background-color: #fafafa;
29+
border-radius: 3px;
30+
}
31+
32+
.container__editor textarea {
33+
outline: 0;
34+
}
35+

src/CodeEditor.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import 'prismjs/components/prism-javascript';
77
import 'prismjs/components/prism-markup';
88
import 'prismjs/components/prism-jsx';
99
import 'prismjs/themes/prism.css';
10+
import './CodeEditor.css';
1011

1112
export function CodeEditor({ InitCode }) {
1213
const IframeData = useContext(IFrameContext);

0 commit comments

Comments
 (0)