Skip to content

Commit

Permalink
Various updates
Browse files Browse the repository at this point in the history
  • Loading branch information
bpierre committed Apr 24, 2024
1 parent bc1b9f8 commit 3b878ae
Show file tree
Hide file tree
Showing 37 changed files with 984 additions and 169 deletions.
1 change: 1 addition & 0 deletions frontend/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"@tanstack/react-query": "^5.31.0",
"dnum": "^2.11.0",
"focus-trap-react": "^10.2.3",
"geist": "^1.3.0",
"next": "14.2.2",
"react": "^18",
"react-dom": "^18",
Expand Down
14 changes: 6 additions & 8 deletions frontend/app/src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// All global CSS should be imported from here, for easier maintenance
// All global styles should be imported here for easier maintenance
import "@liquity2/uikit/index.css";

import type { Metadata } from "next";
Expand All @@ -10,23 +10,21 @@ import { Config } from "@/src/comps/Config/Config";
import { ConfigModal } from "@/src/comps/ConfigModal/ConfigModal";
import { Ethereum } from "@/src/comps/Ethereum/Ethereum";
import { UiKit } from "@liquity2/uikit";
import { Inter } from "next/font/google";

const inter = Inter({ subsets: ["latin"] });
import { GeistSans } from "geist/font/sans";

export const metadata: Metadata = {
title: "Bold",
title: "Liquity v2",
icons: "/favicon.svg",
};

export default function Layout({
children,
}: Readonly<{
}: {
children: ReactNode;
}>) {
}) {
return (
<html lang="en">
<body className={inter.className}>
<body className={GeistSans.className}>
<UiKit>
<Config>
<Ethereum>
Expand Down
22 changes: 0 additions & 22 deletions frontend/app/src/index.css

This file was deleted.

1 change: 1 addition & 0 deletions frontend/uikit-gallery/next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
output: "export",
reactStrictMode: false,
};

export default nextConfig;
6 changes: 4 additions & 2 deletions frontend/uikit-gallery/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,19 @@
"lint": "next lint",
"panda-codegen": "panda codegen --silent",
"start": "next start",
"static-build": "pnpm cosmos-export && pnpm next build && cp -r ./out/_next ./cosmos-export && cp -r ./out/cosmos ./cosmos-export"
"static-build": "cd ../uikit && pnpm build && cd - && pnpm cosmos-export && pnpm next build && cp -r ./out/_next ./cosmos-export && cp -r ./out/cosmos ./cosmos-export"
},
"dependencies": {
"@liquity2/uikit": "workspace:*",
"@react-spring/web": "^9.7.3",
"dnum": "^2.11.0",
"geist": "^1.3.0",
"next": "14.0.4",
"react": "^18",
"react-cosmos-core": "^6.1.1",
"react-cosmos-plugin-boolean-input": "^6.1.1",
"react-dom": "^18",
"ts-pattern": "^5.0.8"
"ts-pattern": "^5.1.1"
},
"devDependencies": {
"@pandacss/dev": "^0.37.2",
Expand Down
7 changes: 7 additions & 0 deletions frontend/uikit-gallery/src/Button/1. Primary.fixture.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
"use client";

import { ButtonFixture } from "./shared";

export default function Fixture() {
return <ButtonFixture defaultMode="primary" />;
}
7 changes: 7 additions & 0 deletions frontend/uikit-gallery/src/Button/2. Secondary.fixture.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
"use client";

import { ButtonFixture } from "./shared";

export default function Fixture() {
return <ButtonFixture defaultMode="secondary" />;
}
7 changes: 7 additions & 0 deletions frontend/uikit-gallery/src/Button/3. Positive.fixture.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
"use client";

import { ButtonFixture } from "./shared";

export default function Fixture() {
return <ButtonFixture defaultMode="positive" />;
}
7 changes: 7 additions & 0 deletions frontend/uikit-gallery/src/Button/4. Negative.fixture.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
"use client";

import { ButtonFixture } from "./shared";

export default function Fixture() {
return <ButtonFixture defaultMode="negative" />;
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@
import { Button } from "@liquity2/uikit";
import { useFixtureInput, useFixtureSelect } from "react-cosmos/client";

export default function ButtonFixture() {
export function ButtonFixture({
defaultMode,
}: {
defaultMode: "primary" | "secondary" | "positive" | "negative";
}) {
const [label] = useFixtureInput("label", "Button");
const [mode] = useFixtureSelect("mode", {
options: ["primary", "secondary", "positive", "negative"],
defaultValue: "secondary",
defaultValue: defaultMode,
});
const [size] = useFixtureSelect("size", {
options: ["medium", "large"],
Expand All @@ -19,7 +23,7 @@ export default function ButtonFixture() {
style={{
display: "flex",
justifyContent: "center",
width: "100%",
width: 608,
padding: 16,
}}
>
Expand Down
7 changes: 7 additions & 0 deletions frontend/uikit-gallery/src/InputField/1. Deposit.fixture.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
"use client";

import { InputFieldFixture } from "./shared";

export default function Fixture() {
return <InputFieldFixture fixture="deposit" />;
}
7 changes: 7 additions & 0 deletions frontend/uikit-gallery/src/InputField/2. Borrow.fixture.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
"use client";

import { InputFieldFixture } from "./shared";

export default function Fixture() {
return <InputFieldFixture fixture="borrow" />;
}
7 changes: 7 additions & 0 deletions frontend/uikit-gallery/src/InputField/3. Interest.fixture.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
"use client";

import { InputFieldFixture } from "./shared";

export default function Fixture() {
return <InputFieldFixture fixture="interest" />;
}
1 change: 1 addition & 0 deletions frontend/uikit-gallery/src/InputField/icon-bold.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions frontend/uikit-gallery/src/InputField/icon-eth.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 3b878ae

Please sign in to comment.