Skip to content

Commit

Permalink
change prettier to single quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
emiljohansson committed Feb 18, 2023
1 parent 01d30c4 commit 4bb803d
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 38 deletions.
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"semi": false,
"useTabs": true,
"singleQuote": false,
"singleQuote": true,
"trailingComma": "all",
"printWidth": 100,
"plugins": [],
Expand Down
17 changes: 8 additions & 9 deletions apps/next/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@ import 'shared/globals.css'

import { PropsWithChildren } from 'react'

export default function Layout ({ children }: PropsWithChildren<unknown>) {
return (
<html lang="en" className="h-full">
<body className="dark:bg-black-rich dark:text-white h-full">
<main className="h-full">
{children}
</main>
</body>
</html>)
export default function Layout({ children }: PropsWithChildren<unknown>) {
return (
<html lang="en" className="h-full">
<body className="dark:bg-black-rich dark:text-white h-full">
<main className="h-full">{children}</main>
</body>
</html>
)
}
6 changes: 3 additions & 3 deletions packages/shared/CheckboxWithLabel.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { CheckboxProps } from "@radix-ui/react-checkbox"
import { Root, Indicator } from "@radix-ui/react-checkbox"
import { CheckIcon } from "@radix-ui/react-icons"
import type { CheckboxProps } from '@radix-ui/react-checkbox'
import { Root, Indicator } from '@radix-ui/react-checkbox'
import { CheckIcon } from '@radix-ui/react-icons'

interface Props extends CheckboxProps {
labelText: string
Expand Down
6 changes: 3 additions & 3 deletions packages/shared/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { PropsWithChildren } from "react"
import Link from "next/link"
import { FiArrowLeft } from "react-icons/fi"
import type { PropsWithChildren } from 'react'
import Link from 'next/link'
import { FiArrowLeft } from 'react-icons/fi'

const Header = ({ children }: PropsWithChildren) => {
return (
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/HeaderAction.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { PropsWithChildren, ReactNode } from "react"
import type { PropsWithChildren, ReactNode } from 'react'

const HeaderAction = ({
children,
Expand Down
16 changes: 8 additions & 8 deletions packages/shared/Progress.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { Root, Indicator } from "@radix-ui/react-progress"
import { motion } from "framer-motion"
import { classNames } from "lib/utils/string"
import { Root, Indicator } from '@radix-ui/react-progress'
import { motion } from 'framer-motion'
import { classNames } from 'lib/utils/string'

export const Progress = ({ progress }: { progress: number }) => {
let colorClass = "bg-green-400"
let colorClass = 'bg-green-400'
if (progress <= 25) {
colorClass = "bg-red-400"
colorClass = 'bg-red-400'
} else if (progress <= 50) {
colorClass = "bg-yellow-200"
colorClass = 'bg-yellow-200'
}
return (
<Root
Expand All @@ -17,9 +17,9 @@ export const Progress = ({ progress }: { progress: number }) => {
>
<Indicator asChild className="h-full">
<motion.div
className={classNames("h-full w-0", colorClass)}
className={classNames('h-full w-0', colorClass)}
animate={{
width: progress + "%",
width: progress + '%',
}}
transition={{ duration: 0.4 }}
/>
Expand Down
6 changes: 3 additions & 3 deletions packages/shared/Slider.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { SliderProps } from "@radix-ui/react-slider"
import { Root, Track, Range, Thumb } from "@radix-ui/react-slider"
import type { SliderProps } from '@radix-ui/react-slider'
import { Root, Track, Range, Thumb } from '@radix-ui/react-slider'

interface Props extends Omit<SliderProps, "defaultValue"> {
interface Props extends Omit<SliderProps, 'defaultValue'> {
defaultValue: number
label?: string
}
Expand Down
16 changes: 8 additions & 8 deletions packages/shared/ThemeToggle.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { useEffect, useState } from "react"
import { motion } from "framer-motion"
import { MoonIcon, SunIcon } from "@radix-ui/react-icons"
import { useEffect, useState } from 'react'
import { motion } from 'framer-motion'
import { MoonIcon, SunIcon } from '@radix-ui/react-icons'

const darkClassName = "dark"
const darkClassName = 'dark'
let savedDarkMode: boolean | undefined

const useDarkMode = () => {
Expand All @@ -14,7 +14,7 @@ const useDarkMode = () => {
savedDarkMode = document.documentElement.classList.contains(darkClassName)
return
}
localStorage.setItem("theme", darkMode ? darkClassName : "")
localStorage.setItem('theme', darkMode ? darkClassName : '')
document.documentElement.classList.toggle(darkClassName, localStorage.theme === darkClassName)
savedDarkMode = document.documentElement.classList.contains(darkClassName)
}, [darkMode])
Expand All @@ -35,16 +35,16 @@ export const ThemeToggle = () => {
initial={{
scale: darkMode === undefined ? 0.5 : 1,
opacity: darkMode === undefined ? 0 : 1,
y: darkMode === undefined ? "-100%" : 0,
y: darkMode === undefined ? '-100%' : 0,
}}
animate={{
scale: darkMode === undefined ? 0.5 : 1,
opacity: darkMode === undefined ? 0 : 1,
y: darkMode === undefined ? "-100%" : 0,
y: darkMode === undefined ? '-100%' : 0,
}}
transition={{ duration: 0.5, delay: 0.5 }}
>
<span className="sr-only">Use {darkMode ? "dark" : "light"} mode</span>
<span className="sr-only">Use {darkMode ? 'dark' : 'light'} mode</span>
{darkMode ? (
<MoonIcon className="block" width="24" height="24" />
) : (
Expand Down
4 changes: 2 additions & 2 deletions packages/shared/styled-jsx.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import "react"
import 'react'

declare module "react" {
declare module 'react' {
interface StyleHTMLAttributes<T> extends React.HTMLAttributes<T> {
jsx?: boolean
global?: boolean
Expand Down

0 comments on commit 4bb803d

Please sign in to comment.