Skip to content

Commit

Permalink
feat: Terminal 컴포넌트 className prop 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
YuHyun-P committed Feb 3, 2024
1 parent 763155f commit 07a1f1b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/frontend/src/components/terminal/Terminal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { type KeyboardEventHandler, forwardRef } from "react";

import { ENTER_KEY } from "../../constants/event";
import type { TerminalContentType } from "../../types/terminalType";
import classnames from "../../utils/classnames";

import CommandInput, { CommandInputForwardRefType } from "./CommandInput";
import * as styles from "./Terminal.css";
Expand All @@ -10,11 +11,12 @@ import TerminalContent from "./TerminalContent";
interface TerminalProps {
gitRef: string;
contentArray: TerminalContentType[];
className?: string;
onTerminal: (input: string) => void;
}

const Terminal = forwardRef<CommandInputForwardRefType, TerminalProps>(
({ gitRef, contentArray, onTerminal }, ref) => {
({ gitRef, contentArray, className = "", onTerminal }, ref) => {
const handleStandardInput: KeyboardEventHandler = async (event) => {
const {
key,
Expand All @@ -36,7 +38,7 @@ const Terminal = forwardRef<CommandInputForwardRefType, TerminalProps>(
};

return (
<div className={styles.terminalContainer}>
<div className={classnames(styles.terminalContainer, className)}>
<TerminalContent contentArray={contentArray} />
<CommandInput
gitRef={gitRef}
Expand Down

0 comments on commit 07a1f1b

Please sign in to comment.