@ktjs/shortcuts 0.5.3 → 0.5.5

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.
Files changed (2) hide show
  1. package/README.md +4 -4
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -36,20 +36,20 @@ pnpm add @ktjs/shortcuts @ktjs/core
36
36
  ### Element Shortcuts
37
37
 
38
38
  ```typescript
39
- import { div, span, button, input, h1, p } from '@ktjs/shortcuts';
39
+ import { div, span, btn, input, h1, p } from '@ktjs/shortcuts';
40
40
 
41
41
  // Instead of h('div', ...)
42
42
  const container = div({ class: 'container' }, [
43
43
  h1({}, 'Title'),
44
44
  p({}, 'Description'),
45
- button({ '@click': () => alert('Hi') }, 'Click me'),
45
+ btn({ '@click': () => alert('Hi') }, 'Click me'),
46
46
  ]);
47
47
 
48
48
  // Form elements
49
49
  const form = div('form-wrapper', [
50
50
  input({ type: 'text', placeholder: 'Name' }),
51
51
  input({ type: 'email', placeholder: 'Email' }),
52
- button({ type: 'submit' }, 'Submit'),
52
+ btn({ type: 'submit' }, 'Submit'),
53
53
  ]);
54
54
 
55
55
  // Quick elements with just content
@@ -107,7 +107,7 @@ const createTextInput = (placeholder: string, name: string) => {
107
107
  };
108
108
 
109
109
  const createSubmitButton = (text: string) => {
110
- return button({ type: 'submit', class: 'btn-primary' }, text);
110
+ return btn({ type: 'submit', class: 'btn-primary' }, text);
111
111
  };
112
112
 
113
113
  const loginForm = div('login-form', [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ktjs/shortcuts",
3
- "version": "0.5.3",
3
+ "version": "0.5.5",
4
4
  "description": "Shortcut functions for kt.js - common DOM operations",
5
5
  "type": "module",
6
6
  "module": "./dist/index.mjs",
@@ -30,7 +30,7 @@
30
30
  "directory": "packages/shortcuts"
31
31
  },
32
32
  "dependencies": {
33
- "@ktjs/core": "0.5.3"
33
+ "@ktjs/core": "0.5.5"
34
34
  },
35
35
  "scripts": {
36
36
  "build": "rollup -c rollup.config.mjs",