typography: remove module css

This commit is contained in:
thislight 2024-11-05 16:07:10 +08:00
parent 9d720d31b4
commit 456cfdfbb0
No known key found for this signature in database
GPG key ID: FCFE5192241CCD4E
4 changed files with 12 additions and 13 deletions

View file

@ -1,7 +1,6 @@
import { JSX, ParentComponent, splitProps, type Ref } from "solid-js";
import { Dynamic } from "solid-js/web";
import typography from "./typography.module.css";
import { mergeClass } from "../utils";
import "./typography.css";
type AnyElement = keyof JSX.IntrinsicElements | ParentComponent<any>;
@ -40,13 +39,11 @@ export function Typography<T extends AnyElement>(
"class",
"typography",
]);
const classes = () =>
mergeClass(managed.class, typography[managed.typography]);
return (
<Dynamic
ref={managed.ref}
component={managed.component ?? "span"}
class={classes()}
class={`${managed.class} ${managed.typography}`}
{...passthough}
></Dynamic>
);