@naptics/vue-collection 0.1.1 → 0.1.2
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/components/NAlert.js +4 -2
- package/package.json +1 -1
package/components/NAlert.js
CHANGED
|
@@ -33,7 +33,9 @@ export const nAlertProps = {
|
|
|
33
33
|
* The `NAlert` is a fully styled alert with multiple variants.
|
|
34
34
|
* It can be used as a normal blocking element or as part of an alert queue.
|
|
35
35
|
*/
|
|
36
|
-
export default createComponent('NAlert', nAlertProps, props
|
|
36
|
+
export default createComponent('NAlert', nAlertProps, (props, {
|
|
37
|
+
slots
|
|
38
|
+
}) => {
|
|
37
39
|
const variant = computed(() => VARIANTS[props.variant]);
|
|
38
40
|
return () => _createVNode("div", {
|
|
39
41
|
"class": `rounded-md p-3 shadow-lg bg-${variant.value.color}-50 ${props.addClass}`
|
|
@@ -45,7 +47,7 @@ export default createComponent('NAlert', nAlertProps, props => {
|
|
|
45
47
|
"class": "ml-3 flex-grow"
|
|
46
48
|
}, [_createVNode("p", {
|
|
47
49
|
"class": `text-sm font-medium text-${variant.value.color}-900`
|
|
48
|
-
}, [props.text])]), !props.hideX && _createVNode("div", {
|
|
50
|
+
}, [slots.default?.() ?? props.text])]), !props.hideX && _createVNode("div", {
|
|
49
51
|
"class": "flex items-center flex-shrink-0 ml-3"
|
|
50
52
|
}, [_createVNode(NIconButton, {
|
|
51
53
|
"color": variant.value.color,
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@naptics/vue-collection",
|
|
3
3
|
"author": "Timo Siegenthaler",
|
|
4
4
|
"description": "Vue Collection is a collection of styled and fully functional Vue components which can easily be integrated into our projects.",
|
|
5
|
-
"version": "0.1.
|
|
5
|
+
"version": "0.1.2",
|
|
6
6
|
"main": "./index.js",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|