Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Functions do not work with arrays #22

Open
bigslycat opened this issue May 17, 2017 · 1 comment
Open

Functions do not work with arrays #22

bigslycat opened this issue May 17, 2017 · 1 comment
Labels

Comments

@bigslycat
Copy link
Member

It works:

const MyComp = styled('div')({
  border: [2, 'solid', 'white'],
});

This does not work:

const MyComp = styled('div')({
  border: ({ children }) => !children && [2, 'solid', 'white'],
});

Works:

const MyComp = styled('div')({
  border: ({ children }) => !children && ['2px', 'solid', 'white'].join(' '),
});
@lttb lttb added the bug label May 18, 2017
@lttb
Copy link
Member

lttb commented May 18, 2017

Thanks for this issue!

It looks like a bug with JSS, see cssinjs/jss#497

@lttb lttb mentioned this issue Oct 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants