diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index 6a723b71..00000000 --- a/.prettierrc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "printWidth": 120, - "bracketSpacing": true, - "tabWidth": 2 -} \ No newline at end of file diff --git a/components/Button/Button.tsx b/components/Button/Button.tsx index b7cff63a..20bb2959 100644 --- a/components/Button/Button.tsx +++ b/components/Button/Button.tsx @@ -1,8 +1,8 @@ -import { red100, red500, red600, white } from "constants/colors"; +import { red100, red500, red600, white } from "constant"; +import { isExternalLink } from "helpers"; import Link from "next/link"; import { ReactNode } from "react"; import styled, { CSSProperties } from "styled-components"; -import { isExternalLink } from "helpers"; interface Props { /** @@ -54,7 +54,9 @@ export function Button({ type = "button", }: Props) { if (onClick && href) { - throw new Error("Cannot have both onClick and href. Must behave as either a link or a button."); + throw new Error( + "Cannot have both onClick and href. Must behave as either a link or a button." + ); } if (!onClick && !href && type !== "submit") { @@ -64,7 +66,9 @@ export function Button({ } if (href && disabled) { - throw new Error("`disabled` only makes sense on `button` elements. Cannot be used with `href`. "); + throw new Error( + "`disabled` only makes sense on `button` elements. Cannot be used with `href`. " + ); } width = typeof width === "string" ? width : `${width}px`; @@ -111,7 +115,12 @@ export function Button({ ) : null} {onClick || type === "submit" ? ( - <_Button onClick={onClick} style={style} disabled={disabled} type={type}> + <_Button + onClick={onClick} + style={style} + disabled={disabled} + type={type} + > {label} ) : null} diff --git a/components/Checkbox/Checkbox.tsx b/components/Checkbox/Checkbox.tsx index 9f789bca..4f95fd94 100644 --- a/components/Checkbox/Checkbox.tsx +++ b/components/Checkbox/Checkbox.tsx @@ -1,9 +1,9 @@ import { CustomCheckboxContainer, CustomCheckboxInput } from "@reach/checkbox"; import "@reach/checkbox/styles.css"; -import { black, white } from "constants/colors"; +import { black, white } from "constant"; +import Check from "public/assets/icons/check.svg"; import { ChangeEvent, ReactNode } from "react"; import styled, { CSSProperties } from "styled-components"; -import Check from "public/assets/icons/check.svg"; interface Props { label: ReactNode; @@ -12,7 +12,13 @@ interface Props { disabled?: boolean; gap?: number; } -export function Checkbox({ label, checked, onChange, disabled, gap = 15 }: Props) { +export function Checkbox({ + label, + checked, + onChange, + disabled, + gap = 15, +}: Props) { const boxBackgroundColor = checked ? black : white; return (