react-socks
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -7,36 +7,42 @@ import * as React from 'react'; | ||
declare namespace ReactSocks { | ||
interface Props { | ||
children?: React.ReactNode; | ||
up?: boolean; | ||
down?: boolean; | ||
only?: boolean; | ||
tagName?: string; | ||
className?: string; | ||
} | ||
interface Props<T = { [key: string]: boolean }> { | ||
children?: React.ReactNode; | ||
up?: boolean; | ||
down?: boolean; | ||
only?: boolean; | ||
tagName?: string; | ||
className?: string; | ||
} | ||
interface BreakpointProviderProps { | ||
children: React.ReactNode; | ||
} | ||
interface BreakpointProviderProps { | ||
children: React.ReactNode; | ||
} | ||
interface BreakpointAndModifierProps { | ||
breakpoint?: string; | ||
modifier?: string; | ||
tagName: string; | ||
className: string; | ||
} | ||
interface BreakpointAndModifierProps { | ||
breakpoint?: string; | ||
modifier?: string; | ||
tagName: string; | ||
className: string; | ||
} | ||
export interface BreakpointContextProps { | ||
currentWidth: number; | ||
currentBreakpointName: string; | ||
} | ||
export function setDefaultBreakpoints(breakpoints: any[]): void; | ||
export interface BreakpointContextProps { | ||
currentWidth: number; | ||
currentBreakpointName: string; | ||
} | ||
export class Breakpoint extends React.Component<ReactSocks.Props> { | ||
static extractBreakpointAndModifierFromProps(allProps: ReactSocks.Props): ReactSocks.BreakpointAndModifierProps; | ||
export interface BreakpointType { | ||
[breakpoint: string]: number; | ||
} | ||
export class BreakpointProvider extends React.Component<ReactSocks.BreakpointProviderProps> { | ||
static handleResize(): void; | ||
} | ||
export function setDefaultBreakpoints(breakpoints: ReactSocks.BreakpointType[]): void; | ||
export function useCurrentWidth(): number; | ||
export function useCurrentBreakpointName(): string; | ||
export class Breakpoint extends React.Component<ReactSocks.Props> { | ||
static extractBreakpointAndModifierFromProps(allProps: ReactSocks.Props): ReactSocks.BreakpointAndModifierProps; | ||
} | ||
export class BreakpointProvider extends React.Component<ReactSocks.BreakpointProviderProps> { | ||
static handleResize(): void; | ||
} | ||
} |
@@ -9,2 +9,6 @@ # Changelog | ||
### 2.0.1 (5 Aug 2019) | ||
* FIX: TypeScript support for dynamic breakpoints and breakpoint hooks | ||
### 2.0.0 (30 Jul 2019) | ||
@@ -11,0 +15,0 @@ |
{ | ||
"name": "react-socks", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "React library to render components only on specific viewports", | ||
@@ -68,2 +68,8 @@ "types": "@types/index.d.ts", | ||
], | ||
"author": "Dinesh Pandiyan <flexdinesh@gmail.com>", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/flexdinesh/react-socks/issues" | ||
}, | ||
"homepage": "https://github.com/flexdinesh/react-socks#readme", | ||
"repository": { | ||
@@ -70,0 +76,0 @@ "type": "git", |
@@ -198,3 +198,3 @@ # React Socks | ||
| :---: | :---: | :---: | :---: | :---: | :---: | | ||
| [<img src="https://avatars1.githubusercontent.com/u/13507950?v=4" width="100px;"/><br /><sub><b>Entkenntnis</b></sub>](https://github.com/Entkenntnis)<br /> | ||
| [<img src="https://avatars1.githubusercontent.com/u/13507950?v=4" width="100px;"/><br /><sub><b>Entkenntnis</b></sub>](https://github.com/Entkenntnis)<br /> | [<img src="https://avatars1.githubusercontent.com/u/1263310?v=4" width="100px;"/><br /><sub><b>Douglas Moore</b></sub>](https://github.com/dbryantm)<br /> | ||
@@ -201,0 +201,0 @@ ## License |
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
29943
149
0
13