-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
11 changed files
with
216 additions
and
157 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { ButtonHTMLAttributes, PropsWithChildren } from 'react'; | ||
|
||
interface Props { | ||
type?: ButtonHTMLAttributes<HTMLButtonElement>['type']; | ||
} | ||
|
||
export function Button({ | ||
type = 'button', | ||
children, | ||
}: PropsWithChildren<Props>) { | ||
return ( | ||
<button | ||
type={type} | ||
className="border border-indigo-950 uppercase p-3 text-indigo-50 text-bold bg-indigo-900 hover:bg-indigo-800" | ||
> | ||
{children} | ||
</button> | ||
); | ||
} |
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,16 @@ | ||
interface Props { | ||
label: string; | ||
name: string; | ||
type?: string; | ||
} | ||
|
||
export function TextField({ label, name, type = 'text' }: Props) { | ||
return ( | ||
<div className="flex flex-col gap-1"> | ||
<label className="uppercase" htmlFor={name}> | ||
{label} | ||
</label> | ||
<input className="border border-indigo-950 p-1" type={type} name={name} /> | ||
</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
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 |
---|---|---|
@@ -1,3 +1,11 @@ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; | ||
|
||
@layer components { | ||
.text-heading { | ||
text-shadow: | ||
5px -5px 0px theme('colors.indigo.50'), | ||
10px -10px 0px theme('colors.indigo.700'); | ||
} | ||
} |
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,34 +1,20 @@ | ||
import { defineConfig } from 'drizzle-kit'; | ||
|
||
const { | ||
LOCAL_DB_PATH, | ||
WRANGLER_CONFIG, | ||
DB_NAME = 'math-rock-stack', | ||
} = process.env; | ||
const { WRANGLER_CONFIG, DB_NAME = 'math-rock-stack' } = process.env; | ||
|
||
export default defineConfig( | ||
LOCAL_DB_PATH | ||
? { | ||
dialect: 'sqlite', | ||
schema: './db/schema.ts', | ||
dbCredentials: { | ||
url: LOCAL_DB_PATH, | ||
}, | ||
} | ||
: { | ||
dialect: 'sqlite', | ||
schema: './db/schema.ts', | ||
out: './migrations', | ||
driver: 'd1', | ||
dbCredentials: { | ||
wranglerConfigPath: | ||
new URL('wrangler.toml', import.meta.url).pathname + | ||
// This is a hack to inject additional cli flags to wrangler | ||
// since drizzle-kit doesn't support specifying environments | ||
WRANGLER_CONFIG | ||
? ` ${WRANGLER_CONFIG}` | ||
: '', | ||
dbName: DB_NAME, | ||
}, | ||
}, | ||
); | ||
export default defineConfig({ | ||
dialect: 'sqlite', | ||
schema: './db/schema.ts', | ||
out: './migrations', | ||
driver: 'd1', | ||
dbCredentials: { | ||
wranglerConfigPath: | ||
new URL('wrangler.toml', import.meta.url).pathname + | ||
// This is a hack to inject additional cli flags to wrangler | ||
// since drizzle-kit doesn't support specifying environments | ||
WRANGLER_CONFIG | ||
? ` ${WRANGLER_CONFIG}` | ||
: '', | ||
dbName: DB_NAME, | ||
}, | ||
}); |
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
Oops, something went wrong.