Skip to content

Commit 2246098

Browse files
authored
Merge pull request #67 from code-hike/split-editor
Split editor
2 parents a004dcf + b6f3cda commit 2246098

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+4019
-1118
lines changed

contributing.md

-14
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,3 @@ Remove a submodule:
1111
```bash
1212
$ ./scripts/rm-submodule.sh react-tutorial-demo
1313
```
14-
15-
## change version
16-
17-
Change all packages versions (will change to `0.0.0+last-commit-sha`):
18-
19-
```bash
20-
$ yarn new-version
21-
```
22-
23-
Or specific version:
24-
25-
```bash
26-
$ yarn new-version 1.0.0
27-
```

packages/mini-editor/src/code-walk.tsx

-34
This file was deleted.

packages/mini-editor/src/code.tsx

+9-9
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@ import {
77
getFocusIndexes,
88
} from "./focus-parser"
99

10-
type CodeProps = {
10+
export type CodeProps = {
1111
prevCode: string
1212
prevFocus: string | null
1313
nextCode: string
1414
nextFocus: string | null
1515
progress: number
1616
language: string
1717
parentHeight?: number
18-
minColumns: number
19-
minZoom: number
20-
maxZoom: number
21-
horizontalCenter: boolean
18+
minColumns?: number
19+
minZoom?: number
20+
maxZoom?: number
21+
horizontalCenter?: boolean
2222
}
2323

2424
export function Code({
@@ -29,10 +29,10 @@ export function Code({
2929
progress,
3030
language,
3131
parentHeight,
32-
minColumns,
33-
minZoom,
34-
maxZoom,
35-
horizontalCenter,
32+
minColumns = 40,
33+
minZoom = 0.5,
34+
maxZoom = 1.5,
35+
horizontalCenter = false,
3636
}: CodeProps) {
3737
const {
3838
prevLines,

0 commit comments

Comments
 (0)