Update new functions
This commit is contained in:
@@ -23,15 +23,15 @@ npm install sigpro-ui
|
||||
|
||||
```javascript
|
||||
// Import everything from sigpro-ui (includes sigpro core)
|
||||
import { $, $mount, Button, Alert, Input, tt } from "sigpro-ui";
|
||||
import { $, Mount, Button, Alert, Input, tt } from "sigpro-ui";
|
||||
import "sigpro-ui/css";
|
||||
|
||||
// Create your app
|
||||
const App = () => {
|
||||
const count = $(0);
|
||||
|
||||
return $html('div', { class: 'p-8 max-w-md mx-auto' }, [
|
||||
$html('h1', { class: 'text-2xl font-bold mb-4' }, 'SigProUI Demo'),
|
||||
return Tag('div', { class: 'p-8 max-w-md mx-auto' }, [
|
||||
Tag('h1', { class: 'text-2xl font-bold mb-4' }, 'SigProUI Demo'),
|
||||
|
||||
Input({
|
||||
placeholder: 'Enter your name...'
|
||||
@@ -50,7 +50,7 @@ const App = () => {
|
||||
};
|
||||
|
||||
// Mount your app
|
||||
$mount(App, "#app");
|
||||
Mount(App, "#app");
|
||||
```
|
||||
|
||||
### CDN Usage (no build step)
|
||||
@@ -77,14 +77,14 @@ Simply add the script tag and start using SigProUI:
|
||||
// All functions are available directly in window
|
||||
// No need to import anything!
|
||||
|
||||
const { $, $mount, Button, Input, Alert } = window;
|
||||
const { $, Mount, Button, Input, Alert } = window;
|
||||
|
||||
const App = () => {
|
||||
const name = $('');
|
||||
const count = $(0);
|
||||
|
||||
return $html('div', { class: 'max-w-md mx-auto p-4' }, [
|
||||
$html('h1', { class: 'text-2xl font-bold mb-4' }, 'SigProUI Demo'),
|
||||
return Tag('div', { class: 'max-w-md mx-auto p-4' }, [
|
||||
Tag('h1', { class: 'text-2xl font-bold mb-4' }, 'SigProUI Demo'),
|
||||
|
||||
Input({
|
||||
value: name,
|
||||
@@ -103,7 +103,7 @@ Simply add the script tag and start using SigProUI:
|
||||
]);
|
||||
};
|
||||
|
||||
$mount(App, '#app');
|
||||
Mount(App, '#app');
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -115,12 +115,12 @@ When you install SigProUI, you get:
|
||||
|
||||
### SigPro Core Functions
|
||||
- `$()` - Reactive signals
|
||||
- `$watch()` - Watch reactive dependencies
|
||||
- `$html()` - Create HTML elements with reactivity
|
||||
- `$if()` - Conditional rendering
|
||||
- `$for()` - List rendering
|
||||
- `$router()` - Hash-based routing
|
||||
- `$mount()` - Mount components to DOM
|
||||
- `Watch()` - Watch reactive dependencies
|
||||
- `Tag()` - Create HTML elements with reactivity
|
||||
- `If()` - Conditional rendering
|
||||
- `For()` - List rendering
|
||||
- `Router()` - Hash-based routing
|
||||
- `Mount()` - Mount components to DOM
|
||||
|
||||
>For more information about SigPro Core visit official Docs [SigPro Docs](https://natxocc.github.io/sigpro/#/)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user