@globalbrain/sefirot
Advanced tools
Comparing version 0.44.0 to 0.45.0
@@ -0,1 +1,7 @@ | ||
# [0.45.0](https://github.com/globalbrain/sefirot/compare/v0.44.0...v0.45.0) (2021-03-16) | ||
### Features | ||
* **alert:** improve composition ([#47](https://github.com/globalbrain/sefirot/issues/47)) ([#48](https://github.com/globalbrain/sefirot/issues/48)) ([8961c67](https://github.com/globalbrain/sefirot/commit/8961c67c3012ac741d25759d8dd07b826d2ecaea)) | ||
# [0.44.0](https://github.com/globalbrain/sefirot/compare/v0.43.0...v0.44.0) (2021-03-15) | ||
@@ -2,0 +8,0 @@ |
import { Values } from '../types/Utils' | ||
import { useStore } from './Store' | ||
import { ButtonAction } from './Action' | ||
@@ -20,4 +21,17 @@ | ||
export function useAlert(alert: Alert): Alert { | ||
return alert | ||
export function useAlert(alert: Alert) { | ||
const store = useStore() | ||
function open(): void { | ||
store.dispatch('alert/open', alert) | ||
} | ||
function close(): void { | ||
store.dispatch('alert/close') | ||
} | ||
return { | ||
open, | ||
close | ||
} | ||
} |
{ | ||
"name": "@globalbrain/sefirot", | ||
"version": "0.44.0", | ||
"version": "0.45.0", | ||
"description": "Vue Components for Global Brain Design System.", | ||
@@ -5,0 +5,0 @@ "files": [ |
257285
1751