Skip to content

Instantly share code, notes, and snippets.

@hereischen
Last active March 6, 2021 07:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hereischen/ec66671ba90774ffcd5386824eac559e to your computer and use it in GitHub Desktop.
Save hereischen/ec66671ba90774ffcd5386824eac559e to your computer and use it in GitHub Desktop.
define inline styles
A better practice is to define styles in a separate constant:
```js
import React from "react"
const buttonStyles: React.CSSProperties = {
backgroundColor: "#5aac44",
borderRadius: "3px",
border: "none",
boxShadow: "none"
}
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment