Skip to content

Commit

Permalink
feat: add generated ui to demo app
Browse files Browse the repository at this point in the history
  • Loading branch information
beeman committed Nov 29, 2023
1 parent 869ea46 commit 18c3dea
Show file tree
Hide file tree
Showing 10 changed files with 569 additions and 25 deletions.
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ tmp
/.yarn
/.nx/cache

pnpm-lock.yaml
14 changes: 14 additions & 0 deletions apps/web/postcss.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module.exports = {
plugins: {
'postcss-preset-mantine': {},
'postcss-simple-vars': {
variables: {
'mantine-breakpoint-xs': '36em',
'mantine-breakpoint-sm': '48em',
'mantine-breakpoint-md': '62em',
'mantine-breakpoint-lg': '75em',
'mantine-breakpoint-xl': '88em',
},
},
},
}
13 changes: 4 additions & 9 deletions apps/web/src/app/app.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import styles from './app.module.css'

import NxWelcome from './nx-welcome'
import { UiThemeProvider } from './ui/ui-theme-provider'

export function App() {
return (
<div>
<NxWelcome title="web" />
</div>
<UiThemeProvider>
<div>Welcome apps/web</div>
</UiThemeProvider>
)
}

export default App
8 changes: 8 additions & 0 deletions apps/web/src/app/ui/ui-theme-provider.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { MantineProvider } from '@mantine/core'
import { ReactNode } from 'react'

import '@mantine/core/styles.css'

export function UiThemeProvider({ children }: { children: ReactNode }) {
return <MantineProvider>{children}</MantineProvider>
}
Binary file modified apps/web/src/favicon.ico
Binary file not shown.
5 changes: 2 additions & 3 deletions apps/web/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Web</title>
<title>PubKey</title>
<base href="/" />

<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<link rel="icon" type="image/x-icon" href="favicon.ico" />
</head>
<body>
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { StrictMode } from 'react'
import * as ReactDOM from 'react-dom/client'

import App from './app/app'
import { App } from './app/app'

const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement)
root.render(
Expand Down
6 changes: 5 additions & 1 deletion apps/web/src/styles.css
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
/* You can add global styles to this file, and also import other style files */
html,
body,
#root {
height: 100%;
}
12 changes: 12 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,17 @@
},
"private": true,
"dependencies": {
"@mantine/core": "^7.2.2",
"@mantine/dates": "^7.2.2",
"@mantine/dropzone": "^7.2.2",
"@mantine/form": "^7.2.2",
"@mantine/hooks": "^7.2.2",
"@mantine/modals": "^7.2.2",
"@mantine/notifications": "^7.2.2",
"@mantine/spotlight": "^7.2.2",
"@nx/devkit": "17.1.3",
"@swc/helpers": "~0.5.2",
"dayjs": "^1.11.10",
"react": "18.2.0",
"react-dom": "18.2.0",
"tslib": "^2.3.0"
Expand Down Expand Up @@ -50,6 +59,9 @@
"json-schema-to-typescript": "^13.1.1",
"lint-staged": "^15.1.0",
"nx": "17.1.3",
"postcss": "^8.4.31",
"postcss-preset-mantine": "^1.11.0",
"postcss-simple-vars": "^7.0.1",
"prettier": "^2.6.2",
"react-refresh": "^0.10.0",
"ts-jest": "^29.1.0",
Expand Down
Loading

0 comments on commit 18c3dea

Please sign in to comment.