Skip to content

Commit f923995

Browse files
committed
deprecate useClassName
1 parent c412562 commit f923995

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

site/src/hooks/useClassName.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import { type DependencyList, useMemo } from "react";
55
export type ClassName = (cssFn: typeof css, theme: Theme) => string;
66

77
/**
8-
* An escape hatch for when you really need to manually pass around a
9-
* `className`. Prefer using the `css` prop whenever possible. If you
10-
* can't use that, then this might be helpful for you.
8+
* @deprecated This hook was used as an escape hatch to generate class names
9+
* using emotion when no other styling method would work. There is no valid new
10+
* usage of this hook. Use Tailwind classes instead.
1111
*/
1212
export function useClassName(styles: ClassName, deps: DependencyList): string {
1313
const theme = useTheme();

0 commit comments

Comments
 (0)