npx degit solidjs/templates/ts-unocss solid-ts
This commit is contained in:
19
src/App.tsx
Normal file
19
src/App.tsx
Normal file
@ -0,0 +1,19 @@
|
||||
import type { Component } from 'solid-js';
|
||||
|
||||
const App: Component = () => {
|
||||
return (
|
||||
<p class="text-4xl text-green-700 text-center py-20">
|
||||
Hello{' '}
|
||||
<a
|
||||
class="text-pink-600 hover:font-bold hover:border-1"
|
||||
href="https://antfu.me/posts/reimagine-atomic-css"
|
||||
target="atomic-css"
|
||||
>
|
||||
Atomic CSS
|
||||
</a>
|
||||
!
|
||||
</p>
|
||||
);
|
||||
};
|
||||
|
||||
export default App;
|
14
src/index.tsx
Normal file
14
src/index.tsx
Normal file
@ -0,0 +1,14 @@
|
||||
import 'uno.css';
|
||||
import { render } from 'solid-js/web';
|
||||
|
||||
import App from './App';
|
||||
|
||||
const root = document.getElementById('root');
|
||||
|
||||
if (import.meta.env.DEV && !(root instanceof HTMLElement)) {
|
||||
throw new Error(
|
||||
'Root element not found. Did you forget to add it to your index.html? Or maybe the id attribute got misspelled?',
|
||||
);
|
||||
}
|
||||
|
||||
render(() => <App />, root!);
|
Reference in New Issue
Block a user