Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create design system package #2

Merged
merged 1 commit into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
},
"overrides": [
{
"files": ["app/**/*.ts?(x)"],
"files": ["app/**/*.ts?(x)", "**/*.stories.ts?(x)"],
arkadiuszbachorski marked this conversation as resolved.
Show resolved Hide resolved
"rules": {
"import/no-default-export": "off"
}
Expand Down
11 changes: 10 additions & 1 deletion app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
//
// SPDX-License-Identifier: MIT
//

import type { Metadata } from 'next'
import type { ReactNode } from 'react'
import './globals.css'
import '@stanfordbdhg/design-system/main.css'
import { themeToCSSVariables, lightTheme } from '@stanfordbdhg/design-system'

export const metadata: Metadata = {
title: 'ENGAGE-HF Web Frontend',
Expand All @@ -22,6 +23,14 @@ interface RootLayoutProps {
export default function RootLayout({ children }: RootLayoutProps) {
return (
<html lang="en">
<head>
<style>
{`
:root { ${themeToCSSVariables(lightTheme)} }
`}
</style>
</head>

<body>{children}</body>
</html>
)
Expand Down
9 changes: 4 additions & 5 deletions app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,9 @@
//
// SPDX-License-Identifier: MIT
//

import Image from 'next/image'
import { generateGreeting } from '@stanfordbdhg/example-package'

export default function Home() {
const greeting = generateGreeting()

return (
<div className="flex min-h-screen items-center justify-center">
<div className="flex flex-col items-center">
Expand All @@ -21,7 +17,10 @@ export default function Home() {
width={634}
height={235}
/>
<h1 className="mt-4 text-center text-3xl">{`${greeting.message} to the ${greeting.project}`}</h1>
<h1 className="mt-4 text-center text-3xl">
Welcome to the Stanford Biodesign Digital Health ENGAGE-HF Web
Frontend
</h1>
</div>
</div>
)
Expand Down
4 changes: 0 additions & 4 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,4 @@ module.exports = {
},
],
},
moduleNameMapper: {
arkadiuszbachorski marked this conversation as resolved.
Show resolved Hide resolved
'^@stanfordbdhg/example-package$':
'<rootDir>/packages/example-package/dist',
},
}
Loading
Loading