not-bulma 1.2.33 → 1.2.35

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "not-bulma",
3
- "version": "1.2.33",
3
+ "version": "1.2.35",
4
4
  "description": "not-* family UI components on Bulma CSS Framework",
5
5
  "main": "src/index.js",
6
6
  "svelte": "src/index.js",
@@ -1,11 +1,12 @@
1
1
  <script>
2
2
  export let classes = "";
3
3
  export let title = "";
4
+ export let narrow = false;
4
5
  </script>
5
6
 
6
7
  <div
7
8
  {title}
8
- class="column {classes}"
9
+ class="column {classes} {narrow ? 'is-narrow' : ''}"
9
10
  on:click
10
11
  on:keyup
11
12
  role="button"
@@ -9,18 +9,16 @@
9
9
 
10
10
  const FALSE_VALUE = {
11
11
  title: LC_FALSE,
12
- color: "danger",
12
+ color: inverted ? "success" : "danger",
13
13
  };
14
+
14
15
  const TRUE_VALUE = {
15
16
  title: LC_TRUE,
16
- color: "success",
17
+ color: inverted ? "danger" : "success",
17
18
  };
18
19
 
19
- const variants = [FALSE_VALUE, TRUE_VALUE];
20
-
21
- $: tagValue = value
22
- ? variants.at(1 + (inverted ? 1 : 0))
23
- : variants.at(0 + (inverted ? 1 : 0));
20
+ //if inverted === true, inverts value
21
+ $: tagValue = value ? TRUE_VALUE : FALSE_VALUE;
24
22
  </script>
25
23
 
26
24
  <UITag {...tagValue} />
@@ -3,12 +3,12 @@
3
3
 
4
4
  export let values = [];
5
5
  export let inverted = false;
6
- export let componentContructor = UIBoolean;
6
+ export let componentConstructor = UIBoolean;
7
7
  </script>
8
8
 
9
9
  {#each values as item}
10
10
  <svelte:component
11
- this={componentContructor}
11
+ this={componentConstructor}
12
12
  {...item}
13
13
  inverted={inverted || item.inverted}
14
14
  />