Add darkmode switch button

This commit is contained in:
2023-06-25 21:58:24 +08:00
parent ddd3548e2b
commit 0a78c23d85
6 changed files with 48 additions and 19 deletions

View File

@@ -1,14 +0,0 @@
import { Component } from "preact";
import Icon from "preact-material-components/Icon";
type Props = {
show: boolean;
icon: string;
};
export default class MyIcon extends Component<Props> {
render() {
if (!this.props.show) return;
return <Icon>{this.props.icon}</Icon>;
}
}