@iroco/ui 1.7.0 → 1.8.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.
- package/dist/Alert.stories.svelte +3 -9
- package/dist/Alert.svelte +13 -2
- package/dist/Alert.svelte.d.ts +1 -0
- package/package.json +1 -1
|
@@ -14,15 +14,9 @@
|
|
|
14
14
|
|
|
15
15
|
{#snippet template({ ...args })}
|
|
16
16
|
<Alert {...args} onclose={() => alert('click')}>
|
|
17
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
a viverra nibh, vitae rutrum ante. Sed pharetra nibh ac velit dignissim ornare sed accumsan
|
|
21
|
-
lacus. Vestibulum tincidunt purus sapien, ac dapibus sem semper a. Nullam venenatis vestibulum
|
|
22
|
-
risus id molestie. Aliquam facilisis nunc at nunc aliquam hendrerit. Etiam sodales sodales
|
|
23
|
-
lectus, ut suscipit lacus vehicula nec. Proin vel magna sed orci condimentum ornare in a odio.
|
|
24
|
-
In varius eu augue eget tincidunt. Ut quis porttitor nulla. Nulla leo nunc, efficitur non ipsum
|
|
25
|
-
vel, tincidunt auctor lectus.
|
|
17
|
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
|
|
18
|
+
<p>Nunc eros lacus, commodo eu tristique non, ultricies eu tellus.</p>
|
|
19
|
+
<p>Nulla facilisi. Integer a tincidunt purus.</p>
|
|
26
20
|
</Alert>
|
|
27
21
|
{/snippet}
|
|
28
22
|
|
package/dist/Alert.svelte
CHANGED
|
@@ -5,14 +5,21 @@
|
|
|
5
5
|
interface Props {
|
|
6
6
|
type?: 'success' | 'danger' | 'flash';
|
|
7
7
|
showClose?: boolean;
|
|
8
|
+
fullWidth?: boolean;
|
|
8
9
|
onclose?: MouseEventHandler<HTMLButtonElement>;
|
|
9
10
|
children?: import('svelte').Snippet;
|
|
10
11
|
}
|
|
11
12
|
|
|
12
|
-
let {
|
|
13
|
+
let {
|
|
14
|
+
type = 'success',
|
|
15
|
+
showClose = true,
|
|
16
|
+
fullWidth = false,
|
|
17
|
+
onclose,
|
|
18
|
+
children
|
|
19
|
+
}: Props = $props();
|
|
13
20
|
</script>
|
|
14
21
|
|
|
15
|
-
<div class={
|
|
22
|
+
<div class={['alert', `alert--${type}`, { fullWidth }]}>
|
|
16
23
|
{#if showClose}
|
|
17
24
|
<button onclick={onclose} class="alert__close">
|
|
18
25
|
<IconClose width="2em" height="2em" />
|
|
@@ -59,4 +66,8 @@
|
|
|
59
66
|
.alert__close:focus {
|
|
60
67
|
outline-color: var(--color-secondary);
|
|
61
68
|
outline-style: auto;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.fullWidth {
|
|
72
|
+
width: 100%;
|
|
62
73
|
}</style>
|
package/dist/Alert.svelte.d.ts
CHANGED