-
Notifications
You must be signed in to change notification settings - Fork 262
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BREAKING CHANGE: new context api for concurrent mode * contextual styles * extract compute computeSelector * fix styles mapping * fix missing file, add new types * update readme * fix typing * fix registry.add * support passing regitry manually * update tests * adopt codereview comments * rm useless comments * update readme
- Loading branch information
Showing
17 changed files
with
449 additions
and
357 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,24 @@ | ||
// Definitions by: @types/styled-jsx <https://www.npmjs.com/package/@types/styled-jsx> | ||
|
||
import 'react' | ||
import React from 'react' | ||
|
||
declare module 'react' { | ||
interface StyleHTMLAttributes<T> extends HTMLAttributes<T> { | ||
jsx?: boolean | ||
global?: boolean | ||
} | ||
} | ||
|
||
export type StyleRegistry = { | ||
styles(options?: { nonce?: boolean }): JSX.Element | ||
flush(): void | ||
add(props: any): void | ||
remove(props: any): void | ||
} | ||
export function useStyleRegistry(): StyleRegistry | ||
export function StyleRegistry({ | ||
children, | ||
registry | ||
}: { | ||
children: JSX.Element | React.ReactNode | ||
registry?: StyleRegistry | ||
}): JSX.Element | ||
export function createStyleRegistry(): StyleRegistry |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = require('./dist') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.