@mekari/pixel-toast
Advanced tools
Comparing version 0.2.4 to 0.3.0
@@ -91,3 +91,4 @@ 'use strict'; | ||
shadow: 'lg', | ||
lineHeight: 0 | ||
lineHeight: 0, | ||
zIndex: '9999' | ||
} | ||
@@ -110,2 +111,3 @@ }, [h(pixelIcon.MpIcon, { | ||
function useToast() { | ||
const DEFAULT_ZINDEX = 5500; | ||
const { | ||
@@ -121,3 +123,4 @@ theme, | ||
description, | ||
variant = 'solid' | ||
variant = 'solid', | ||
zIndex = DEFAULT_ZINDEX | ||
}) { | ||
@@ -149,2 +152,9 @@ const options = { | ||
}, options); | ||
const el = document.getElementsByClassName(`Breadstick__manager-${position}`); | ||
if (zIndex !== DEFAULT_ZINDEX) { | ||
el[0].style.zIndex = zIndex; | ||
} else { | ||
el[0].style.zIndex = DEFAULT_ZINDEX; | ||
} | ||
} | ||
@@ -151,0 +161,0 @@ |
@@ -91,3 +91,4 @@ 'use strict'; | ||
shadow: 'lg', | ||
lineHeight: 0 | ||
lineHeight: 0, | ||
zIndex: '9999' | ||
} | ||
@@ -110,2 +111,3 @@ }, [h(pixelIcon.MpIcon, { | ||
function useToast() { | ||
const DEFAULT_ZINDEX = 5500; | ||
const { | ||
@@ -121,3 +123,4 @@ theme, | ||
description, | ||
variant = 'solid' | ||
variant = 'solid', | ||
zIndex = DEFAULT_ZINDEX | ||
}) { | ||
@@ -149,2 +152,9 @@ const options = { | ||
}, options); | ||
const el = document.getElementsByClassName(`Breadstick__manager-${position}`); | ||
if (zIndex !== DEFAULT_ZINDEX) { | ||
el[0].style.zIndex = zIndex; | ||
} else { | ||
el[0].style.zIndex = DEFAULT_ZINDEX; | ||
} | ||
} | ||
@@ -151,0 +161,0 @@ |
@@ -83,3 +83,4 @@ import Breadstick from 'breadstick'; | ||
shadow: 'lg', | ||
lineHeight: 0 | ||
lineHeight: 0, | ||
zIndex: '9999' | ||
} | ||
@@ -102,2 +103,3 @@ }, [h(MpIcon, { | ||
function useToast() { | ||
const DEFAULT_ZINDEX = 5500; | ||
const { | ||
@@ -113,3 +115,4 @@ theme, | ||
description, | ||
variant = 'solid' | ||
variant = 'solid', | ||
zIndex = DEFAULT_ZINDEX | ||
}) { | ||
@@ -141,2 +144,9 @@ const options = { | ||
}, options); | ||
const el = document.getElementsByClassName(`Breadstick__manager-${position}`); | ||
if (zIndex !== DEFAULT_ZINDEX) { | ||
el[0].style.zIndex = zIndex; | ||
} else { | ||
el[0].style.zIndex = DEFAULT_ZINDEX; | ||
} | ||
} | ||
@@ -143,0 +153,0 @@ |
{ | ||
"name": "@mekari/pixel-toast", | ||
"description": "Mekari Pixel | Toast component component", | ||
"version": "0.2.4", | ||
"version": "0.3.0", | ||
"homepage": "https://mekari.design/", | ||
@@ -6,0 +6,0 @@ "repository": { |
@@ -83,3 +83,4 @@ import Breadstick from 'breadstick' | ||
shadow: 'lg', | ||
lineHeight: 0 | ||
lineHeight: 0, | ||
zIndex: '9999' | ||
} | ||
@@ -99,4 +100,12 @@ }, | ||
function useToast() { | ||
const DEFAULT_ZINDEX = 5500 | ||
const { theme, colorMode } = colorModeObserver | ||
function notify({ position = 'bottom', duration = 5000, title, description, variant = 'solid' }) { | ||
function notify({ | ||
position = 'bottom', | ||
duration = 5000, | ||
title, | ||
description, | ||
variant = 'solid', | ||
zIndex = DEFAULT_ZINDEX | ||
}) { | ||
const options = { | ||
@@ -112,3 +121,3 @@ position, | ||
props: { | ||
theme, | ||
theme | ||
} | ||
@@ -138,2 +147,9 @@ }, | ||
}, options) | ||
const el = document.getElementsByClassName(`Breadstick__manager-${position}`) | ||
if (zIndex !== DEFAULT_ZINDEX) { | ||
el[0].style.zIndex = zIndex | ||
} else { | ||
el[0].style.zIndex = DEFAULT_ZINDEX | ||
} | ||
} | ||
@@ -140,0 +156,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14018
588