-
Notifications
You must be signed in to change notification settings - Fork 212
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: move component library from tailwind to sass
- Loading branch information
Showing
117 changed files
with
3,559 additions
and
2,527 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1 @@ | ||
import { fileURLToPath } from "node:url"; | ||
|
||
import { nextjs, tailwind, storybook } from "@cprussin/eslint-config"; | ||
|
||
const tailwindConfig = fileURLToPath( | ||
import.meta.resolve(`./tailwind.config.ts`), | ||
); | ||
|
||
export default [...nextjs, ...tailwind(tailwindConfig), ...storybook]; | ||
export { nextjs as default } from "@cprussin/eslint-config"; |
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1 @@ | ||
import { fileURLToPath } from "node:url"; | ||
|
||
import { base, tailwind, mergeConfigs } from "@cprussin/prettier-config"; | ||
|
||
const tailwindConfig = fileURLToPath( | ||
import.meta.resolve(`./tailwind.config.ts`), | ||
); | ||
|
||
export default mergeConfigs([base, tailwind(tailwindConfig)]); | ||
export { base as default } from "@cprussin/prettier-config"; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
import "../tailwind.css"; | ||
|
||
export { Root as default } from "../components/Root"; | ||
export { metadata, viewport } from "../metadata"; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
@use "@pythnetwork/component-library/theme.scss"; | ||
|
||
.copyButton { | ||
margin: -#{theme.spacing(0.5)} -0.5em; | ||
display: inline-block; | ||
white-space: nowrap; | ||
border-radius: theme.border-radius("md"); | ||
padding: theme.spacing(0.5) 0.5em; | ||
border: none; | ||
background: none; | ||
cursor: pointer; | ||
transition: background-color 100ms linear; | ||
outline: none; | ||
|
||
.iconContainer { | ||
position: relative; | ||
top: 0.125em; | ||
margin-left: theme.spacing(1); | ||
display: inline-block; | ||
|
||
.copyIconContainer { | ||
opacity: 0.5; | ||
transition: opacity 100ms linear; | ||
|
||
.copyIcon { | ||
width: 1em; | ||
height: 1em; | ||
} | ||
|
||
.copyIconLabel { | ||
@include theme.sr-only; | ||
} | ||
} | ||
|
||
.checkIcon { | ||
position: absolute; | ||
inset: 0; | ||
color: theme.color("states", "success", "normal"); | ||
opacity: 0; | ||
transition: opacity 100ms linear; | ||
} | ||
} | ||
|
||
&[data-hovered] { | ||
background-color: theme.color("button", "outline", "background", "hover"); | ||
} | ||
|
||
&[data-pressed] { | ||
background-color: theme.color("button", "outline", "background", "active"); | ||
} | ||
|
||
&[data-focus-visible] { | ||
outline: 1px auto currentcolor; | ||
outline-offset: theme.spacing(1); | ||
} | ||
|
||
&[data-is-copied] .iconContainer { | ||
.copyIconContainer { | ||
opacity: 0; | ||
} | ||
|
||
.checkIcon { | ||
opacity: 1; | ||
} | ||
} | ||
} |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
@use "@pythnetwork/component-library/theme.scss"; | ||
|
||
.h1 { | ||
font-size: theme.font-size("2xl"); | ||
font-weight: theme.font-weight("medium"); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
import clsx from "clsx"; | ||
import type { ComponentProps } from "react"; | ||
|
||
import styles from "./index.module.scss"; | ||
|
||
export const H1 = ({ className, children, ...props }: ComponentProps<"h1">) => ( | ||
<h1 className={clsx(className, "text-2xl font-medium")} {...props}> | ||
<h1 className={clsx(styles.h1, className)} {...props}> | ||
{children} | ||
</h1> | ||
); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
@use "@pythnetwork/component-library/theme.scss"; | ||
|
||
.loading { | ||
@include theme.max-width; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import { Skeleton } from "@pythnetwork/component-library/Skeleton"; | ||
|
||
import styles from "./index.module.scss"; | ||
import { H1 } from "../H1"; | ||
import { MaxWidth } from "../MaxWidth"; | ||
|
||
export const Loading = () => ( | ||
<MaxWidth> | ||
<div className={styles.loading}> | ||
<H1> | ||
<Skeleton className="w-60" /> | ||
<Skeleton width={60} /> | ||
</H1> | ||
</MaxWidth> | ||
</div> | ||
); |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,9 @@ | ||
import { ButtonLink } from "@pythnetwork/component-library/Button"; | ||
|
||
import { MaxWidth } from "../MaxWidth"; | ||
|
||
export const NotFound = () => ( | ||
<MaxWidth> | ||
<div> | ||
<h1>Not Found</h1> | ||
<p>{"The page you're looking for isn't here"}</p> | ||
<ButtonLink href="/">Go Home</ButtonLink> | ||
</MaxWidth> | ||
</div> | ||
); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
@use "@pythnetwork/component-library/theme.scss"; | ||
|
||
.overview { | ||
@include theme.max-width; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import styles from "./index.module.scss"; | ||
import { H1 } from "../H1"; | ||
import { MaxWidth } from "../MaxWidth"; | ||
|
||
export const Overview = () => ( | ||
<MaxWidth> | ||
<div className={styles.overview}> | ||
<H1>Overview</H1> | ||
</MaxWidth> | ||
</div> | ||
); |
Oops, something went wrong.