SG
Size: a a a
SG
NS
LH
SG
SG
SG
NS
LH
LH
NS
DB
LH
DB
SM
const withTheme = Component => props =>
<ThemeContext.Consumer>
{value => <Component {...value} {...props} />}
</Consumer>;
DB
const withTheme = Component => props =>
<ThemeContext.Consumer>
{value => <Component {...value} {...props} />}
</Consumer>;
const withTheme = <T extends {}>(Component: React.ComponentType<T & AdditionalProps>) => (props: T) => (
<ThemeContext.Consumer>
{(value: AdditionalProps) => <Component {...value} {...props} />}
</Consumer>;
)
AB
const withTheme = Component => props =>
<ThemeContext.Consumer>
{value => <Component {...value} {...props} />}
</Consumer>;
AB
const withTheme = <T extends {}>(Component: React.ComponentType<T & AdditionalProps>) => (props: T) => (
<ThemeContext.Consumer>
{(value: AdditionalProps) => <Component {...value} {...props} />}
</Consumer>;
)
DB
AB
ДМ