Add OutlinedTextFiled from material design 3

This commit is contained in:
2023-07-03 16:50:58 +08:00
parent 0f3bf48c70
commit d97f832a78
5 changed files with 54 additions and 1 deletions

View File

@@ -0,0 +1,22 @@
import { Component, ContextType } from "preact";
import { GlobalCtx } from "./GlobalContext.tsx";
import { MdOutlinedTextField } from "../server/dmodule.ts";
type Props = {
show: boolean;
};
export default class CreateRootUser extends Component<Props> {
static contextType = GlobalCtx;
declare context: ContextType<typeof GlobalCtx>;
render() {
if (!MdOutlinedTextField.value) return null;
if (!this.props.show) return null;
const OutlinedTextField = MdOutlinedTextField.value;
return (
<div>
<OutlinedTextField />
</div>
);
}
}