Skip to content

Commit

Permalink
fix system return types incompatible with styled-components
Browse files Browse the repository at this point in the history
  • Loading branch information
roginfarrer committed Mar 26, 2021
1 parent 00d710a commit b5c8451
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion examples/styled-components/src/Box.tsx
Expand Up @@ -18,7 +18,7 @@ import {
CSSObject,
Theme,
} from 'system-props';
import { CSSProp } from 'styled-components';
import styled, { CSSProp } from 'styled-components';
import * as CSS from 'csstype';

const system = createSystem();
Expand Down
9 changes: 4 additions & 5 deletions examples/styled-components/src/main.tsx
@@ -1,11 +1,10 @@
import React from 'react'
import ReactDOM from 'react-dom'
import './index.css'
import App from './App'
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';

ReactDOM.render(
<React.StrictMode>
<App />
</React.StrictMode>,
document.getElementById('root')
)
);
2 changes: 1 addition & 1 deletion src/core/createSystem.ts
Expand Up @@ -190,7 +190,7 @@ export const createSystem = ({
const parser = createParser(config, pseudoSelectors, strict);
const cssFunction = createCss(config, tokenPrefix);
parser.css = cssFunction;
return parser as Required<Parser<typeof tokenPrefix>>;
return parser;
};

return system;
Expand Down

0 comments on commit b5c8451

Please sign in to comment.