Skip to content

Commit c85039e

Browse files
committed
Minor design changes for live preview
1 parent 09a3b23 commit c85039e

File tree

4 files changed

+18
-16
lines changed

4 files changed

+18
-16
lines changed

Diff for: docuilib/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "uilib-docs",
3-
"version": "3.20.0",
3+
"version": "3.21.0",
44
"main": "./src/index.ts",
55
"scripts": {
66
"docusaurus": "docusaurus",

Diff for: docuilib/src/components/UILivePreview.module.scss

+10-14
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,26 @@
1-
$preview-width: 375px;
1+
$preview-width: 350px;
22
$preview-margin: 60px;
3+
$editor-height: 700px;
34

45
.container {
56
display: flex;
67
}
78

89
.liveEditor {
9-
height: 100%;
10-
11-
pre {
12-
height: 100%;
13-
border-radius: 0;
14-
background-color: #13191E;
15-
}
10+
height: $editor-height;
1611
}
1712

1813
.codeContainer {
1914
position: relative;
2015
flex: 1;
16+
height: 100%;
2117
max-width: calc(100% - ($preview-width + $preview-margin));
22-
border-radius: 4px;
23-
overflow: hidden;
18+
border-radius: 8px;
19+
overflow-y: scroll;
2420

2521
pre {
26-
padding: 10px 20px;
22+
min-height: 100%;
23+
padding: 20px !important;
2724
}
2825
}
2926

@@ -37,11 +34,10 @@ $preview-margin: 60px;
3734
.preview {
3835
position: relative;
3936
width: $preview-width;
40-
height: 700px;
4137
margin-left: $preview-margin;
4238
border-radius: 36px;
43-
border: 1px solid #eee;
44-
box-shadow: 0 0 10px rgba(110, 120, 129, 0.2);
39+
border: 1px solid #ddd;
40+
box-shadow: 0 0 15px rgba(110, 120, 129, 0.05);
4541
overflow: hidden;
4642
}
4743

Diff for: docuilib/src/pages/livePreview.module.css

+6-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66

77
.fakeTopBar {
88
height: 60px;
9-
background-color: #ddd;
109
margin-bottom: 1px;
10+
border-bottom: 1px solid #eee;
11+
}
12+
13+
.fakeSafeArea {
14+
height: 40px;
15+
border-top: 1px solid #eee;
1116
}

Diff for: docuilib/src/pages/livePreview.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export default function UILivePreview() {
1919
<LiveProvider code={code} scope={ReactLiveScope}>
2020
<div className={styles.fakeTopBar}/>
2121
<LivePreview className={styles.mobileFlexContainer}/>
22+
<div className={styles.fakeSafeArea}/>
2223
</LiveProvider>
2324
);
2425
}

0 commit comments

Comments
 (0)