mirror of
https://github.com/BlowaterNostr/blowater.git
synced 2024-10-18 15:43:20 +00:00
55d6735e7b
and remove submodules
35 lines
927 B
TypeScript
35 lines
927 B
TypeScript
/* jsx h */
|
|
import { Component, h } from "preact";
|
|
import { emitFunc } from "../event-bus.ts";
|
|
import { Empty } from "./_helper.ts";
|
|
|
|
type Props = {
|
|
emit: emitFunc<FilterContent>;
|
|
};
|
|
|
|
export class Filter extends Component<Props, Empty> {
|
|
render() {
|
|
return (
|
|
<div class="border flex flex-col items-center">
|
|
<div class="flex flex-row border">
|
|
<input
|
|
placeholder={"search content"}
|
|
onInput={(e) => {
|
|
this.props.emit({
|
|
type: "FilterContent",
|
|
content: e.currentTarget.value,
|
|
});
|
|
}}
|
|
>
|
|
</input>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|
|
}
|
|
|
|
export type FilterContent = {
|
|
type: "FilterContent";
|
|
content: string;
|
|
};
|