-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bccb56c
commit 2945635
Showing
17 changed files
with
370 additions
and
21 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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,2 +1,3 @@ | ||
tsup.config.ts | ||
dist | ||
dist | ||
index.d.ts |
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,4 @@ | ||
declare module "*.module.css" { | ||
const classes: { readonly [key: string]: string }; | ||
export default classes; | ||
} |
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,33 @@ | ||
.button { | ||
border-radius: var(--flows-borderRadius-small); | ||
cursor: pointer; | ||
transition: | ||
background-color 120ms ease-in-out, | ||
border-color 120ms ease-in-out; | ||
padding: 4px 8px; | ||
font-family: var(--flows-font-family); | ||
font-size: var(--flows-base-font-size); | ||
line-height: var(--flows-base-line-height); | ||
font-weight: 600; | ||
white-space: nowrap; | ||
text-decoration: none; | ||
} | ||
|
||
.primary { | ||
background-color: var(--flows-bg-primary); | ||
border: 1px solid var(--flows-bg-primary); | ||
color: var(--flows-fg-onPrimary); | ||
} | ||
.primary:hover { | ||
background-color: var(--flows-bg-primary-hover); | ||
border: 1px solid var(--flows-bg-primary-hover); | ||
} | ||
|
||
.secondary { | ||
background-color: var(--flows-bg-subtle); | ||
border: var(--flows-border); | ||
color: var(--flows-fg-default); | ||
} | ||
.secondary:hover { | ||
background-color: var(--flows-bg-hover); | ||
} |
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,20 @@ | ||
import classNames from "classnames"; | ||
import { type FC, type ReactNode } from "react"; | ||
import classes from "./button.module.css"; | ||
|
||
interface Props { | ||
className?: string; | ||
children?: ReactNode; | ||
onClick?: () => void; | ||
variant: "primary" | "secondary"; | ||
} | ||
|
||
export const Button: FC<Props> = ({ className, variant, ...props }) => { | ||
return ( | ||
<button | ||
type="button" | ||
className={classNames(classes.button, classes[variant], className)} | ||
{...props} | ||
/> | ||
); | ||
}; |
17 changes: 17 additions & 0 deletions
17
workspaces/react/src/components/icon-button/icon-button.module.css
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,17 @@ | ||
.button { | ||
border-radius: var(--flows-borderRadius-small); | ||
cursor: pointer; | ||
transition: | ||
background-color 120ms ease-in-out, | ||
border-color 120ms ease-in-out; | ||
background-color: rgba(0, 0, 0, 0); | ||
border: none; | ||
padding: 0; | ||
width: 20px; | ||
height: 20px; | ||
display: grid; | ||
place-items: center; | ||
} | ||
.button:hover { | ||
background-color: var(--flows-bg-hover); | ||
} |
13 changes: 13 additions & 0 deletions
13
workspaces/react/src/components/icon-button/icon-button.tsx
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,13 @@ | ||
import { type FC, type ReactNode } from "react"; | ||
import classNames from "classnames"; | ||
import classes from "./icon-button.module.css"; | ||
|
||
interface Props { | ||
className?: string; | ||
children?: ReactNode; | ||
onClick?: () => void; | ||
} | ||
|
||
export const IconButton: FC<Props> = ({ className, ...props }) => { | ||
return <button type="button" className={classNames(classes.button, className)} {...props} />; | ||
}; |
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,15 @@ | ||
.text { | ||
font-family: var(--flows-font-family); | ||
margin: 0; | ||
} | ||
|
||
.body { | ||
font-size: var(--flows-base-font-size); | ||
line-height: var(--flows-base-line-height); | ||
} | ||
|
||
.title { | ||
font-size: var(--flows-title-font-size); | ||
line-height: var(--flows-title-line-height); | ||
font-weight: var(--flows-title-font-weight); | ||
} |
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,13 @@ | ||
import classNames from "classnames"; | ||
import { type FC, type ReactNode } from "react"; | ||
import classes from "./Text.module.css"; | ||
|
||
interface Props { | ||
className?: string; | ||
children?: ReactNode; | ||
variant: "title" | "body"; | ||
} | ||
|
||
export const Text: FC<Props> = ({ className, variant, ...props }) => { | ||
return <p className={classNames(classes.text, classes[variant], className)} {...props} />; | ||
}; |
Oops, something went wrong.