Initial commit

This commit is contained in:
kevisual
2024-09-17 13:34:22 +08:00
commit 596c50cd0b
21 changed files with 4064 additions and 0 deletions

5
src/App.tsx Normal file
View File

@@ -0,0 +1,5 @@
const a = 1
export const App = () => {
return <div className="bg-slate-200 w-20 h-10 border">App</div>;
};

30
src/assets/styles.css Normal file
View File

@@ -0,0 +1,30 @@
.scrollbar {
/* 整个滚动条 */
&::-webkit-scrollbar {
width: 3px;
height: 3px;
}
/* 滚动条有滑块的轨道部分 */
&::-webkit-scrollbar-track-piece {
background-color: transparent;
border-radius: 1px;
}
/* 滚动条滑块(竖向:vertical 横向:horizontal) */
&::-webkit-scrollbar-thumb {
cursor: pointer;
background-color: black;
border-radius: 5px;
}
/* 滚动条滑块hover */
&::-webkit-scrollbar-thumb:hover {
background-color: #999999;
}
/* 同时有垂直和水平滚动条时交汇的部分 */
&::-webkit-scrollbar-corner {
display: block; /* 修复交汇时出现的白块 */
}
}

View File

@@ -0,0 +1,12 @@
type LoadingProps = {
loading?: boolean;
children?: React.ReactNode;
};
export const Loading = (props: LoadingProps) => {
if (!props.loading) return <>{props.children}</>;
return (
<div className='w-full h-full flex justify-center items-center'>
<div className='w-20 h-20 border-t-8 border-b-8 rounded-full animate-spin'></div>
</div>
);
};

View File

@@ -0,0 +1,6 @@
export const ForModal = () => {
return <div id='for-modal'></div>;
};
export const getContainer = () => {
return document.querySelector('#for-modal')!;
};

View File

@@ -0,0 +1 @@
export * from './container'

15
src/globals.css Normal file
View File

@@ -0,0 +1,15 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
@layer base {
h1 {
@apply text-2xl font-bold;
}
h2 {
@apply text-xl font-bold;
}
h3 {
@apply text-lg font-bold;
}
}

12
src/index.css Normal file
View File

@@ -0,0 +1,12 @@
html,
body {
width: 100%;
height: 100%;
font-size: 16px;
font-family: 'Montserrat', sans-serif;
}
#root {
width: 100%;
height: 100%;
}

8
src/main.tsx Normal file
View File

@@ -0,0 +1,8 @@
import { createRoot } from 'react-dom/client';
import { App } from './App.tsx';
// import './tailwind.css';
import './globals.css';
import './index.css';
import './assets/styles.css';
createRoot(document.getElementById('root')!).render(<App />);

3
src/tailwind.css Normal file
View File

@@ -0,0 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

6
src/vite-env.d.ts vendored Normal file
View File

@@ -0,0 +1,6 @@
/// <reference types="vite/client" />
type SimpleObject = {
[key: string | number]: any;
};
declare let DEV_SERVER: boolean;