DefinitelyTyped/types/react-with-styles/react-with-styles-tests.ts
Mohsen Azimi f47f8eeea9 Add types for react-with-styles (#38335)
* Add typings for react-with-styles

* Add typings for react-with-styles

* Add typings for react-with-styles

* fix header

* Fix issues
2019-09-16 12:32:59 -07:00

10 lines
326 B
TypeScript

import * as React from 'react';
import { withStyles, WithStylesProps, css } from 'react-with-styles';
const Component: React.FC<WithStylesProps> = ({ styles }) =>
React.createElement('div', { ...css(styles.wrapper) });
const StyledComponent = withStyles(({ unit }) => ({
wrapper: { borderRadius: unit },
}))(Component);