Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
pettinarip committed Aug 4, 2022
1 parent f27afc3 commit 0afb025
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions docs/best-practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,12 @@ export default ComponentName
## Styling

- `src/theme.ts` - Declares site color themes, breakpoints and other constants (try to utilize these colors first)
- We use [styled-components](https://styled-components.com/)
- We use [emotion](https://emotion.sh/)

- Tagged template literals are used to style custom components

```tsx
// Example of styling syntax using styled-components
// Example of styling syntax using emotion
import styled from "@emotion/styled"
Expand All @@ -128,8 +128,6 @@ export default ComponentName
// ie: <PrimaryButton>Text</PrimaryButton>
```

- Recommended VS Code Plugin: `vscode-styled-components` <br>To install: Open VS Code > `Ctrl+P` / `Cmd+P` > Run: <br>`ext install vscode-styled-components`

- Values from `src/theme.ts` are automatically passed as a prop object to styled components

```tsx
Expand Down

0 comments on commit 0afb025

Please sign in to comment.