Skip to content

Typescript support: useFela with props + css with varags params#697

Merged
robinweser merged 1 commit intorobinweser:masterfrom
reinhard:feature/useFela-props
Apr 9, 2019
Merged

Typescript support: useFela with props + css with varags params#697
robinweser merged 1 commit intorobinweser:masterfrom
reinhard:feature/useFela-props

Conversation

@reinhard
Copy link
Copy Markdown
Contributor

@reinhard reinhard commented Apr 5, 2019

Description

As @marcneander pointed out in #676, the Typescript definition for useFela does not cover passing properties. Based on http://fela.js.org/docs/api/bindings/useFela.html this PR contains following improvements:

  • passing props to useFela
  • passing style as varargs to the css function

Example

See https://github.com/Indoqa/indoqa-react/blob/feature/usefela-with-props/packages/style-system-demo/src/fela/FelaHookSamples.tsx for all supported useFela usages.

// your code 

Packages

List all packages that have been changed.

Versioning

None / Patch / Minor / Major

Checklist

Quality Assurance

You can also run yarn run check to run all 4 commands at once.

  • The code was formatted using Prettier (yarn run format)
  • The code has no linting errors (yarn run lint)
  • All tests are passing (yarn run test)
  • There are no flow-type errors (yarn run flow)

Changes

If one of the following checks doesn't make sense due to the type of PR, just check them.

  • Tests have been added/updated
  • Documentation has been added/updated
  • My changes have proper flow-types

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants