mirror of
https://github.com/wavetermdev/waveterm.git
synced 2024-12-22 16:48:23 +01:00
29 lines
668 B
TypeScript
29 lines
668 B
TypeScript
// Copyright 2023, Command Line Inc.
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
import { clsx } from "clsx";
|
|
import * as React from "react";
|
|
|
|
import "./inputdecoration.less";
|
|
|
|
interface InputDecorationProps {
|
|
position?: "start" | "end";
|
|
children: React.ReactNode;
|
|
}
|
|
|
|
const InputDecoration = (props: InputDecorationProps) => {
|
|
const { children, position = "end" } = props;
|
|
return (
|
|
<div
|
|
className={clsx("input-decoration", {
|
|
"start-position": position === "start",
|
|
"end-position": position === "end",
|
|
})}
|
|
>
|
|
{children}
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export { InputDecoration };
|