AppTopBar: support app bar props
This commit is contained in:
parent
12718930db
commit
5d1cf347a4
1 changed files with 2 additions and 1 deletions
|
@ -2,11 +2,12 @@ import { AppBar, Toolbar } from "@suid/material";
|
||||||
import { splitProps, type JSX, type ParentComponent } from "solid-js";
|
import { splitProps, type JSX, type ParentComponent } from "solid-js";
|
||||||
import "./AppTopBar.css";
|
import "./AppTopBar.css";
|
||||||
import { useWindowSize } from "@solid-primitives/resize-observer";
|
import { useWindowSize } from "@solid-primitives/resize-observer";
|
||||||
|
import type { AppBarProps } from "@suid/material/AppBar";
|
||||||
|
|
||||||
const AppTopBar: ParentComponent<{
|
const AppTopBar: ParentComponent<{
|
||||||
class?: string;
|
class?: string;
|
||||||
style?: JSX.HTMLAttributes<HTMLElement>["style"];
|
style?: JSX.HTMLAttributes<HTMLElement>["style"];
|
||||||
}> = (oprops) => {
|
} & AppBarProps> = (oprops) => {
|
||||||
const [props, rest] = splitProps(oprops, ["children", "class"]);
|
const [props, rest] = splitProps(oprops, ["children", "class"]);
|
||||||
const windowSize = useWindowSize();
|
const windowSize = useWindowSize();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue