From f45bb899bbe782d91d3aede10273d321453fca05 Mon Sep 17 00:00:00 2001 From: waldronmatt Date: Sun, 8 Oct 2023 14:33:24 -0400 Subject: [PATCH] fix(vite-project): update app with demo-ui fixes and imported reset/normalize styles --- apps/vite-project/package.json | 4 +++- apps/vite-project/src/App.css | 6 +----- apps/vite-project/src/App.tsx | 10 +++++----- apps/vite-project/src/index.css | 8 -------- apps/vite-project/src/main.tsx | 2 ++ 5 files changed, 11 insertions(+), 19 deletions(-) diff --git a/apps/vite-project/package.json b/apps/vite-project/package.json index eaa9c4f5..4357b7ab 100644 --- a/apps/vite-project/package.json +++ b/apps/vite-project/package.json @@ -15,7 +15,9 @@ "@waldronmatt/demo-ui": "^1.1.2", "@waldronmatt/parity": "^2.0.0", "react": "^18.2.0", - "react-dom": "^18.2.0" + "react-dom": "^18.2.0", + "sanitize.css": "^13.0.0", + "the-new-css-reset": "^1.11.0" }, "devDependencies": { "@types/react": "^18.2.15", diff --git a/apps/vite-project/src/App.css b/apps/vite-project/src/App.css index b9d355df..cd6107eb 100644 --- a/apps/vite-project/src/App.css +++ b/apps/vite-project/src/App.css @@ -34,9 +34,5 @@ } .card { - padding: 2em; -} - -.read-the-docs { - color: #888; + padding: 1em; } diff --git a/apps/vite-project/src/App.tsx b/apps/vite-project/src/App.tsx index a94e1558..95f9773c 100644 --- a/apps/vite-project/src/App.tsx +++ b/apps/vite-project/src/App.tsx @@ -1,8 +1,8 @@ import { useState } from 'react'; import reactLogo from './assets/react.svg'; import viteLogo from '/vite.svg'; +import '@waldronmatt/demo-ui/styles/global.css'; import { Button } from '@waldronmatt/demo-ui/components/Button/index.js'; -import { Link } from '@waldronmatt/demo-ui/components/Link/index.js'; import { addition } from '@waldronmatt/basic-math/addition.js'; import { isEven } from '@waldronmatt/parity/even.js'; import './App.css'; @@ -14,12 +14,12 @@ function App() { return ( <>
- + Vite logo - - + + React logo - +

Vite + React

diff --git a/apps/vite-project/src/index.css b/apps/vite-project/src/index.css index 2c3fac68..23baaf18 100644 --- a/apps/vite-project/src/index.css +++ b/apps/vite-project/src/index.css @@ -23,14 +23,6 @@ a:hover { color: #535bf2; } -body { - margin: 0; - display: flex; - place-items: center; - min-width: 320px; - min-height: 100vh; -} - h1 { font-size: 3.2em; line-height: 1.1; diff --git a/apps/vite-project/src/main.tsx b/apps/vite-project/src/main.tsx index 21d8d32d..d1554c8c 100644 --- a/apps/vite-project/src/main.tsx +++ b/apps/vite-project/src/main.tsx @@ -1,6 +1,8 @@ import React from 'react'; import ReactDOM from 'react-dom/client'; import App from './App.js'; +import 'the-new-css-reset/css/reset.css'; +import 'sanitize.css'; import './index.css'; ReactDOM.createRoot(document.getElementById('root')!).render(