aboutsummaryrefslogtreecommitdiff
path: root/src/console/components/Console.tsx
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2021-04-04 16:44:47 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2021-04-04 17:34:57 +0900
commit2b1079525b86dad45df11e6ad29a89989a6416ab (patch)
tree6bc29a0bce0adc66b6b82d01ecb8eab3e835d8d1 /src/console/components/Console.tsx
parent20faca581a3b832301c9dca3074b0f61ba163d62 (diff)
Separate Message to InfoMessage and ErrorMessage
Diffstat (limited to 'src/console/components/Console.tsx')
-rw-r--r--src/console/components/Console.tsx10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/console/components/Console.tsx b/src/console/components/Console.tsx
index fa91336..951b627 100644
--- a/src/console/components/Console.tsx
+++ b/src/console/components/Console.tsx
@@ -1,7 +1,8 @@
import React from "react";
import Input from "./console/Input";
import Completion from "./console/Completion";
-import Message from "./console/Message";
+import InfoMessage from "./InfoMessage";
+import ErrorMessage from "./ErrorMessage";
import * as consoleActions from "../../console/actions/console";
import CommandLineParser, {
InputPhase,
@@ -199,10 +200,15 @@ const Console: React.FC = () => {
</ColorSchemeProvider>
);
case "info":
+ return (
+ <ColorSchemeProvider colorscheme={state.colorscheme}>
+ <InfoMessage>{state.messageText}</InfoMessage>
+ </ColorSchemeProvider>
+ );
case "error":
return (
<ColorSchemeProvider colorscheme={state.colorscheme}>
- <Message mode={state.mode}>{state.messageText}</Message>
+ <ErrorMessage>{state.messageText}</ErrorMessage>
</ColorSchemeProvider>
);
default: