Skip to content

Commit

Permalink
refactor: Rename main function
Browse files Browse the repository at this point in the history
  • Loading branch information
arkarlov committed Sep 15, 2024
1 parent e30b888 commit 2fe9603
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export * from "./stringifyCSSProperties";
export * from "./stringifyStyles";
export * from "./stringifyStyleMap";

export * from "./types";
8 changes: 4 additions & 4 deletions src/stringifyStyles.ts → src/stringifyStyleMap.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { type StyleObject } from "./types";
import { type StyleMap } from "./types";
import { stringifyCSSProperties } from "./stringifyCSSProperties";

export function stringifyStyles(
styleObject: StyleObject,
export function stringifyStyleMap(
styleMap: StyleMap,
isImportant: boolean = false
) {
return Object.entries(styleObject)
return Object.entries(styleMap)
.map(
([key, value]) => `${key}{${stringifyCSSProperties(value, isImportant)}}`
)
Expand Down
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ import { type CSSProperties } from "react";

export type CSSSelector = string;

export type StyleObject = Record<CSSSelector, CSSProperties>;
export type StyleMap = Record<CSSSelector, CSSProperties>;

0 comments on commit 2fe9603

Please sign in to comment.