create-asterui 0.1.5 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/templates/js/src/App.jsx
CHANGED
|
@@ -1,23 +1,40 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Button, useTheme, ThemeController, Hero, Space } from 'asterui'
|
|
2
2
|
|
|
3
|
-
function
|
|
3
|
+
function Logo() {
|
|
4
|
+
const { colors } = useTheme()
|
|
4
5
|
return (
|
|
5
|
-
|
|
6
|
-
<
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 40" className="h-12 w-auto">
|
|
7
|
+
<text
|
|
8
|
+
x="100"
|
|
9
|
+
y="30"
|
|
10
|
+
textAnchor="middle"
|
|
11
|
+
fontFamily="system-ui, -apple-system, sans-serif"
|
|
12
|
+
fontSize="28"
|
|
13
|
+
fontWeight="700"
|
|
14
|
+
>
|
|
15
|
+
<tspan fill={colors.primary}>Aster</tspan>
|
|
16
|
+
<tspan fill={colors.foreground}>UI</tspan>
|
|
17
|
+
</text>
|
|
18
|
+
</svg>
|
|
19
|
+
)
|
|
20
|
+
}
|
|
11
21
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
</p>
|
|
18
|
-
</div>
|
|
22
|
+
function App() {
|
|
23
|
+
return (
|
|
24
|
+
<Hero className="min-h-screen bg-base-200 relative">
|
|
25
|
+
<div className="absolute top-4 right-4">
|
|
26
|
+
<ThemeController.Swap />
|
|
19
27
|
</div>
|
|
20
|
-
|
|
28
|
+
<Space direction="vertical" size="lg" align="center">
|
|
29
|
+
<Logo />
|
|
30
|
+
<p className="text-base-content/70">
|
|
31
|
+
100+ React components built with DaisyUI and Tailwind CSS
|
|
32
|
+
</p>
|
|
33
|
+
<Button color="primary" href="https://asterui.com">
|
|
34
|
+
View Documentation
|
|
35
|
+
</Button>
|
|
36
|
+
</Space>
|
|
37
|
+
</Hero>
|
|
21
38
|
)
|
|
22
39
|
}
|
|
23
40
|
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { StrictMode } from 'react'
|
|
2
2
|
import { createRoot } from 'react-dom/client'
|
|
3
|
+
import { ThemeProvider } from 'asterui'
|
|
3
4
|
import './index.css'
|
|
4
5
|
import App from './App'
|
|
5
6
|
|
|
6
7
|
createRoot(document.getElementById('root')).render(
|
|
7
8
|
<StrictMode>
|
|
8
|
-
<
|
|
9
|
+
<ThemeProvider defaultTheme="system">
|
|
10
|
+
<App />
|
|
11
|
+
</ThemeProvider>
|
|
9
12
|
</StrictMode>,
|
|
10
13
|
)
|
package/templates/ts/src/App.tsx
CHANGED
|
@@ -1,23 +1,40 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Button, useTheme, ThemeController, Hero, Space } from 'asterui'
|
|
2
2
|
|
|
3
|
-
function
|
|
3
|
+
function Logo() {
|
|
4
|
+
const { colors } = useTheme()
|
|
4
5
|
return (
|
|
5
|
-
|
|
6
|
-
<
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 40" className="h-12 w-auto">
|
|
7
|
+
<text
|
|
8
|
+
x="100"
|
|
9
|
+
y="30"
|
|
10
|
+
textAnchor="middle"
|
|
11
|
+
fontFamily="system-ui, -apple-system, sans-serif"
|
|
12
|
+
fontSize="28"
|
|
13
|
+
fontWeight="700"
|
|
14
|
+
>
|
|
15
|
+
<tspan fill={colors.primary}>Aster</tspan>
|
|
16
|
+
<tspan fill={colors.foreground}>UI</tspan>
|
|
17
|
+
</text>
|
|
18
|
+
</svg>
|
|
19
|
+
)
|
|
20
|
+
}
|
|
11
21
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
</p>
|
|
18
|
-
</div>
|
|
22
|
+
function App() {
|
|
23
|
+
return (
|
|
24
|
+
<Hero className="min-h-screen bg-base-200 relative">
|
|
25
|
+
<div className="absolute top-4 right-4">
|
|
26
|
+
<ThemeController.Swap />
|
|
19
27
|
</div>
|
|
20
|
-
|
|
28
|
+
<Space direction="vertical" size="lg" align="center">
|
|
29
|
+
<Logo />
|
|
30
|
+
<p className="text-base-content/70">
|
|
31
|
+
100+ React components built with DaisyUI and Tailwind CSS
|
|
32
|
+
</p>
|
|
33
|
+
<Button color="primary" href="https://asterui.com">
|
|
34
|
+
View Documentation
|
|
35
|
+
</Button>
|
|
36
|
+
</Space>
|
|
37
|
+
</Hero>
|
|
21
38
|
)
|
|
22
39
|
}
|
|
23
40
|
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { StrictMode } from 'react'
|
|
2
2
|
import { createRoot } from 'react-dom/client'
|
|
3
|
+
import { ThemeProvider } from 'asterui'
|
|
3
4
|
import './index.css'
|
|
4
5
|
import App from './App'
|
|
5
6
|
|
|
6
7
|
createRoot(document.getElementById('root')!).render(
|
|
7
8
|
<StrictMode>
|
|
8
|
-
<
|
|
9
|
+
<ThemeProvider defaultTheme="system">
|
|
10
|
+
<App />
|
|
11
|
+
</ThemeProvider>
|
|
9
12
|
</StrictMode>,
|
|
10
13
|
)
|