add terminal modal which can be displayed and dismissed while preserving the terminal state

This commit is contained in:
Keith Simmons
2022-07-06 13:20:54 -07:00
parent 00d1c2e56f
commit 2d126c7c5c
6 changed files with 196 additions and 68 deletions
+15 -1
View File
@@ -1,7 +1,8 @@
import Theme from "../themes/common/theme";
import { border, modalShadow } from "./components";
export default function terminal(theme: Theme) {
return {
let colors = {
black: theme.ramps.neutral(0).hex(),
red: theme.ramps.red(0.5).hex(),
green: theme.ramps.green(0.5).hex(),
@@ -20,6 +21,7 @@ export default function terminal(theme: Theme) {
brightWhite: theme.ramps.neutral(7).hex(),
foreground: theme.ramps.neutral(7).hex(),
background: theme.ramps.neutral(0).hex(),
modalBackground: theme.ramps.neutral(1).hex(),
cursor: theme.ramps.neutral(7).hex(),
dimBlack: theme.ramps.neutral(7).hex(),
dimRed: theme.ramps.red(0.75).hex(),
@@ -32,4 +34,16 @@ export default function terminal(theme: Theme) {
brightForeground: theme.ramps.neutral(7).hex(),
dimForeground: theme.ramps.neutral(0).hex(),
};
return {
colors,
modalContainer: {
background: colors.modalBackground,
cornerRadius: 8,
padding: 8,
margin: 25,
border: border(theme, "primary"),
shadow: modalShadow(theme),
}
};
}