@seahax/elemental 0.5.8 → 0.5.9

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 +22 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -302,3 +302,25 @@ h(parent, items.map((item) => {
302
302
  return h('p', { 'data-key': item.id }, [item.text]);
303
303
  }));
304
304
  ```
305
+
306
+ ## Combine Conditional Classes
307
+
308
+ ```ts
309
+ // Using a dictionary of boolean values.
310
+ const classNames = classes({
311
+ 'my-class-0': true,
312
+ 'my-class-1': false,
313
+ 'my-class-2': undefined,
314
+ 'my-class-3': null,
315
+ 'my-class-4': true,
316
+ }); // = 'my-class-0 my-class-4'
317
+
318
+ // Using a sparse array.
319
+ const classNames = classes([
320
+ 'my-class-0',
321
+ false,
322
+ undefined,
323
+ null,
324
+ 'my-class-4',
325
+ ]); // = 'my-class-0 my-class-3'
326
+ ```
package/package.json CHANGED
@@ -21,5 +21,5 @@
21
21
  "publishConfig": {
22
22
  "access": "public"
23
23
  },
24
- "version": "0.5.8"
24
+ "version": "0.5.9"
25
25
  }