Last active
March 6, 2021 07:37
-
-
Save hereischen/ec66671ba90774ffcd5386824eac559e to your computer and use it in GitHub Desktop.
define inline styles
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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