rumious 2.0.2 → 2.1.0

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/dist/index.js +6 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -868,6 +868,12 @@ const directives = {
868
868
  element.value = String(state.get());
869
869
  };
870
870
  break;
871
+ case 'show':
872
+ reactive = () => element.style.display = state.get() ? '' : 'none';
873
+ break;
874
+ case 'hide':
875
+ reactive = () => element.style.display = state.get() ? 'none' : '';
876
+ break;
871
877
  default:
872
878
  throw new Error(`Unknown bind directive modifier: ${modifier}`);
873
879
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rumious",
3
- "version": "2.0.2",
3
+ "version": "2.1.0",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",