Skip to content

Commit d9d7a27

Browse files
committed
Gather utils in an fr object
1 parent 01467a3 commit d9d7a27

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

src/lib/colors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export type ColorTheme = {
1111
options: ColorOptions;
1212
};
1313

14-
export function useColorTheme(): ColorTheme {
14+
export function useColors(): ColorTheme {
1515
const { isDark } = useIsDark();
1616

1717
const options = useMemo(() => getColorOptions({ isDark }), [isDark]);

src/lib/index.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1+
export * from "./start";
12
export { useIsDark, $isDark } from "./darkMode";
2-
export * from "./breakpoints";
33
export * from "./colors";
4-
export * from "./start";
4+
export type { BreakpointKeys } from "./breakpoints";
5+
import { breakpoints } from "./breakpoints";
6+
import { spacing } from "./spacing";
7+
export type { SpacingToken } from "./spacing";
8+
9+
export const fr = {
10+
breakpoints,
11+
spacing
12+
};

src/lib/spacing.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const spacingTokenByValue = {
1111

1212
type SpacingTokenByValue = typeof spacingTokenByValue;
1313

14-
type SpacingToken = keyof SpacingTokenByValue;
14+
export type SpacingToken = keyof SpacingTokenByValue;
1515

1616
export function spacing<T extends SpacingToken>(token: T): SpacingTokenByValue[T];
1717
export function spacing<

0 commit comments

Comments
 (0)