This commit is contained in:
@@ -33,11 +33,11 @@ const App = () => {
|
||||
return h('div', { class: 'p-8 max-w-md mx-auto' }, [
|
||||
h('h1', { class: 'text-2xl font-bold mb-4' }, 'SigProUI Demo'),
|
||||
|
||||
Input({
|
||||
input({
|
||||
placeholder: 'Enter your name...'
|
||||
}),
|
||||
|
||||
Button({
|
||||
button({
|
||||
class: 'btn-primary mt-4',
|
||||
onclick: () => count(count() + 1)
|
||||
}, () => `Clicks: ${count()}`),
|
||||
@@ -86,12 +86,12 @@ Simply add the script tag and start using SigProUI:
|
||||
return h('div', { class: 'max-w-md mx-auto p-4' }, [
|
||||
h('h1', { class: 'text-2xl font-bold mb-4' }, 'SigProUI Demo'),
|
||||
|
||||
Input({
|
||||
input({
|
||||
value: name,
|
||||
placeholder: 'Enter your name...'
|
||||
}),
|
||||
|
||||
Button({
|
||||
button({
|
||||
class: 'btn-primary mt-4',
|
||||
onclick: () => count(count() + 1)
|
||||
}, () => `Clicks: ${count()}`),
|
||||
@@ -125,8 +125,8 @@ When you install SigProUI, you get:
|
||||
>For more information about SigPro Core visit official Docs [SigPro Docs](https://natxocc.github.io/sigpro/#/)
|
||||
|
||||
### UI Components
|
||||
- `Button()` - Styled button with DaisyUI
|
||||
- `Input()` - Form input with floating labels
|
||||
- `button()` - Styled button with DaisyUI
|
||||
- `input()` - Form input with floating labels
|
||||
- `Alert()` - Alert messages
|
||||
- `Modal()` - Modal dialogs
|
||||
- `Table()` - Data tables
|
||||
@@ -147,8 +147,8 @@ import { tt, Locale } from 'sigpro-ui';
|
||||
Locale('en');
|
||||
|
||||
// Use translations
|
||||
const closeButton = Button({}, tt('close')());
|
||||
const searchPlaceholder = Input({ placeholder: tt('search')() });
|
||||
const closeButton = button({}, tt('close')());
|
||||
const searchPlaceholder = input({ placeholder: tt('search')() });
|
||||
```
|
||||
|
||||
## TypeScript Support
|
||||
@@ -159,7 +159,7 @@ SigProUI includes TypeScript definitions. Import types as needed:
|
||||
import { Button, Input, type ButtonProps, type InputProps } from 'sigpro-ui';
|
||||
|
||||
const MyButton: React.FC<ButtonProps> = (props) => {
|
||||
return Button(props, 'Click me');
|
||||
return button(props, 'Click me');
|
||||
};
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user