Skip to content

Commit

Permalink
Fix DefaultTheme interface
Browse files Browse the repository at this point in the history
  • Loading branch information
drozdzynski committed Oct 24, 2024
1 parent f492af9 commit 38f8858
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/two-mangos-attack.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@teiler/core": patch
---

Fix `DefaultTheme` interface
6 changes: 4 additions & 2 deletions packages/core/src/constructor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@ import type { Pattern } from './pattern'
import hash from './hash'
import { compile, transpile } from './css'

type DefaultTheme = {}
interface DefaultTheme {
[key: string]: unknown
}

type Arguments<Props> = {
theme: DefaultTheme
} & Props

type CSS<Props> = { styles: Style<Props>[]; id: string; __css__: true }
type Expression<Props> = (props: Arguments<Props>) => string | boolean | CSS<Props>
type Expression<Props> = (props: Arguments<Props>) => string | boolean | undefined | CSS<Props>
type Raw = string | number
type Properties<Props> = Expression<Props> | StyleDefinition<HTMLElements, Props> | Pattern<HTMLElements, Props> | TeilerComponent<HTMLElements, Props> | Raw
type Style<Props> = [string[], Properties<Props>[]]
Expand Down

0 comments on commit 38f8858

Please sign in to comment.