-
Notifications
You must be signed in to change notification settings - Fork 593
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
teacher tool - set module css pattern (#9832)
* set module css pattern * lint * update name
- Loading branch information
1 parent
12fffd4
commit 24ef5ef
Showing
9 changed files
with
151 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import * as React from "react"; | ||
// eslint-disable-next-line import/no-internal-modules | ||
import css from "./styling/MainPanel.module.css"; | ||
|
||
import DebugInput from "./DebugInput"; | ||
import MakeCodeFrame from "./MakecodeFrame"; | ||
import EvalResultDisplay from "./EvalResultDisplay"; | ||
import ActiveRubricDisplay from "./ActiveRubricDisplay"; | ||
import SplitPane from "./SplitPane"; | ||
|
||
interface IProps {} | ||
|
||
const MainPanel: React.FC<IProps> = () => { | ||
return ( | ||
<div className={css["main-panel"]}> | ||
<SplitPane split={"vertical"} defaultSize={"80%"} primary={"left"}> | ||
{/* Left side */} | ||
<> | ||
<DebugInput /> | ||
<ActiveRubricDisplay /> | ||
<EvalResultDisplay /> | ||
</> | ||
{/* Right side */} | ||
<> | ||
<MakeCodeFrame /> | ||
</> | ||
</SplitPane> | ||
</div> | ||
); | ||
}; | ||
|
||
export default MainPanel; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import * as React from "react"; | ||
// eslint-disable-next-line import/no-internal-modules | ||
import css from "./styling/SplitPane.module.css"; | ||
import { classList } from "react-common/components/util"; | ||
|
||
interface IProps { | ||
className?: string; | ||
split: "horizontal" | "vertical"; | ||
defaultSize: number | string; | ||
primary: "left" | "right"; | ||
children: React.ReactNode; | ||
} | ||
|
||
const SplitPane: React.FC<IProps> = ({ className, split, children }) => { | ||
const [left, right] = React.Children.toArray(children); | ||
|
||
return ( | ||
<div className={classList(css[`split-pane-${split}`], className)}> | ||
<div className={css[`left-${split}`]}>{left}</div> | ||
<div className={css[`splitter-${split}`]}> | ||
<div className={css[`splitter-${split}-inner`]} /> | ||
</div> | ||
<div className={css[`right-${split}`]}>{right}</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default SplitPane; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
|
||
.main-panel { | ||
display: flex; | ||
flex-direction: column; | ||
min-height: 100%; | ||
width: 100%; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
|
||
/* Vertical split pane */ | ||
|
||
.split-pane-vertical { | ||
display: flex; | ||
flex-direction: row; | ||
height: 100%; | ||
width: 100%; | ||
} | ||
|
||
.left-vertical { | ||
flex: 1; | ||
overflow: auto; | ||
} | ||
|
||
.right-vertical { | ||
flex: 1; | ||
overflow: auto; | ||
} | ||
|
||
.splitter-vertical { | ||
background-color: #ccc; | ||
width: 1px; | ||
} | ||
|
||
.splitter-vertical-inner { | ||
position: relative; | ||
background-color: transparent; | ||
transition: background-color 0.2s ease; | ||
left: -3px; | ||
width: 6px; | ||
height: 100%; | ||
cursor: ew-resize; | ||
} | ||
|
||
.splitter-vertical-inner:hover { | ||
background-color: #000000aa; | ||
transition: background-color 0.2s ease; | ||
transition-delay: 0.2s; | ||
} | ||
|
||
/* Horizontal split pane */ | ||
|
||
.split-pane-horizontal { | ||
display: flex; | ||
flex-direction: column; | ||
height: 100%; | ||
width: 100%; | ||
} | ||
|
||
.left-horizontal { | ||
flex: 1; | ||
overflow: auto; | ||
} | ||
|
||
.right-horizontal { | ||
flex: 1; | ||
overflow: auto; | ||
} | ||
|
||
.splitter-horizontal { | ||
flex: 0 0 1px; | ||
background-color: #ccc; | ||
height: 5px; | ||
cursor: ns-resize; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters