Commit 375a6f9e by HoMeTown

feat: 调整样式

parent 0ad7b6b9
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
}, },
"dependencies": { "dependencies": {
"@nextui-org/react": "^2.4.6", "@nextui-org/react": "^2.4.6",
"@reactuses/core": "^5.0.19",
"react": "^18.3.1", "react": "^18.3.1",
"react-dom": "^18.3.1", "react-dom": "^18.3.1",
"react-router-dom": "^6.26.0" "react-router-dom": "^6.26.0"
......
import './App.css' import './App.css'
import { Button } from '@nextui-org/button' import { Button } from '@nextui-org/button'
import { useToggle } from '@reactuses/core'
import { motion } from 'framer-motion'
import React from 'react' import React from 'react'
const App: React.FC = () => { const App: React.FC = () => {
const [on, toggle] = useToggle(true)
return ( return (
<div> <div>
<Button color="primary">Button</Button> <motion.div
className="w-[100px] h-[100px] bg-slate-300"
>
{on ? 'ON' : 'OFF'}
</motion.div>
<Button color="primary" onClick={toggle}>Toggle</Button>
</div> </div>
) )
} }
......
...@@ -2,6 +2,7 @@ import React from 'react' ...@@ -2,6 +2,7 @@ import React from 'react'
import ReactDOM from 'react-dom/client' import ReactDOM from 'react-dom/client'
import { BrowserRouter } from 'react-router-dom' import { BrowserRouter } from 'react-router-dom'
import { NextUIProvider } from '@nextui-org/react' import { NextUIProvider } from '@nextui-org/react'
import { motion } from 'framer-motion'
import App from './App' import App from './App'
import './styles/index.less' import './styles/index.less'
...@@ -13,11 +14,11 @@ if (rootEl) { ...@@ -13,11 +14,11 @@ if (rootEl) {
const root = ReactDOM.createRoot(rootEl) const root = ReactDOM.createRoot(rootEl)
root.render( root.render(
<React.StrictMode> <React.StrictMode>
<NextUIProvider> <NextUIProvider className="h-full">
<BrowserRouter> <BrowserRouter>
<main> <motion.main className="h-full">
<App /> <App />
</main> </motion.main>
</BrowserRouter> </BrowserRouter>
</NextUIProvider> </NextUIProvider>
</React.StrictMode>, </React.StrictMode>,
......
...@@ -4,15 +4,15 @@ ...@@ -4,15 +4,15 @@
} }
// 其他全局样式... // 其他全局样式...
// html { html {
// height: 100%; height: 100%;
// background-color: var(--background-default); }
// color: var(--text-primary); body {
// } height: 100%;
// body { min-width: 375px;
// background-color: var(--background-default); font-family: -apple-system, blinkmacsystemfont, "Helvetica Neue", helvetica, "segoe ui", arial, roboto, "PingFang SC", miui, "Hiragino Sans GB", "Microsoft Yahei", sans-serif;
// color: var(--text-primary); }
// height: 100%; #root {
// min-width: 375px; height: 100%;
// font-family: -apple-system, blinkmacsystemfont, "Helvetica Neue", helvetica, "segoe ui", arial, roboto, "PingFang SC", miui, "Hiragino Sans GB", "Microsoft Yahei", sans-serif; margin: 0;
// } }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment