Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
jpudysz committed Oct 13, 2023
1 parent ce5cd32 commit ef2d92a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@ export const App: React.FunctionComponent = () => {

return (
<UnistylesTheme theme={appTheme}>
<Examples.Memoization />
<Examples.Extreme
onToggleTheme={() => setTheme(prevState => prevState === Theme.Light
? Theme.Dark
: Theme.Light
)}
/>
</UnistylesTheme>
)
}
2 changes: 1 addition & 1 deletion src/types/mediaQueries.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
type Optional<TOptional extends string> = TOptional | ''
type Separator = ',' | ', '
// this is super weird, but number passes empty string and bigint does not
type MediaQuery = `[${Separator}${bigint}]` | `[${bigint}${Optional<`${Separator}${bigint}`>}]`
type WidthMediaQuery = `:w${MediaQuery}`
type HeightMediaQuery = `:h${MediaQuery}`

// this is super weird, but number passes empty string and bigint does not
export type MediaQueries =
| `${WidthMediaQuery}${Optional<HeightMediaQuery>}`
| `${HeightMediaQuery}${Optional<WidthMediaQuery>}`

0 comments on commit ef2d92a

Please sign in to comment.