Skip to content

Commit

Permalink
fix: fix typings
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredLunde committed Dec 19, 2021
1 parent e9d6ba4 commit 955d876
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
"devDependencies": {
"@commitlint/cli": "latest",
"@commitlint/config-conventional": "latest",
"@dash-ui/styles": "^0.8.9",
"@semantic-release/changelog": "^6.0.1",
"@semantic-release/git": "^10.0.1",
"@swc-node/core": "^1.8.2",
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ export function createStyles<
}

// style('text', {})
function style(...args: StyleArguments<Extract<keyof T, string>>) {
function style(
...args: StyleArguments<Extract<keyof T, string | number>>
) {
const numArgs = args.length;
let sheet = memoMap.default
? compileStyles(memoMap.default, tokens[currentTheme] as V)
Expand Down Expand Up @@ -554,9 +556,9 @@ export interface CreateStylesOptions<

export type StyleMap<
S extends RNStyles,
V extends Record<string, unknown> = DashTokens
V extends Record<string | number, unknown> = DashTokens
> = {
[name: string]: string | StyleCallback<S, V> | StyleObject<S>;
[name: string | number]: string | StyleCallback<S, V> | StyleObject<S>;
};

export type StyleValue<
Expand Down

0 comments on commit 955d876

Please sign in to comment.