Skip to content
This repository has been archived by the owner on Aug 27, 2020. It is now read-only.

Styles outside of components error #2

Closed
ahoyahoy opened this issue Jan 26, 2018 · 2 comments
Closed

Styles outside of components error #2

ahoyahoy opened this issue Jan 26, 2018 · 2 comments

Comments

@ahoyahoy
Copy link

ahoyahoy commented Jan 26, 2018

I cannot use

import * as css from 'styled-jsx/css'
const button = css`button { color: hotpink; }`

error:

[ts] Cannot invoke an expression whose type lacks a call signature. Type 'typeof 'styled-jsx/css'' has no compatible call signatures.

@nikolajlovenhardt
Copy link

Hi @ahoyahoy. A colleague of mine has tried to get in touch with you without luck, and so I'm trying to reach out here (I'm sorry for the inconvenience). Would you please contact Morten Samson ms(at)spotonmarketing.dk.

Thank you in advance (!)

@deptno deptno closed this as completed in 7a5417d Feb 6, 2018
@deptno
Copy link
Owner

deptno commented Feb 6, 2018

import css from 'styled-jsx/css'

const button = css`button { color: hotpink; }`

export const Button = props => (
  <button>
    <style jsx>{button}</style>
      i’m button
  </button>
)

I adjusted the next.js/5 with typescript and i’ve tested it

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants