flowbite-svelte 0.24.1 → 0.24.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/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [0.24.2](https://github.com/themesberg/flowbite-svelte/compare/v0.24.1...v0.24.2) (2022-08-07)
6
+
7
+
8
+ ### Features
9
+
10
+ * add export divClass to Toast for user custom CSS ([7625c01](https://github.com/themesberg/flowbite-svelte/commit/7625c017af9a91920880b3d9c09d8f02924178e5))
11
+
5
12
  ### [0.24.1](https://github.com/themesberg/flowbite-svelte/compare/v0.24.0...v0.24.1) (2022-08-07)
6
13
 
7
14
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flowbite-svelte",
3
- "version": "0.24.1",
3
+ "version": "0.24.2",
4
4
  "description": "Flowbite components for Svelte",
5
5
  "main": "index.js",
6
6
  "author": {
@@ -10,6 +10,7 @@ export let params = {};
10
10
  // Absolute position
11
11
  export let position = undefined; // default not set
12
12
  export let visible = true;
13
+ export let divClass = 'w-full max-w-xs p-4 text-gray-500 bg-white rounded-lg shadow dark:text-gray-400 dark:bg-gray-800';
13
14
  const colors = {
14
15
  blue: 'text-blue-500 bg-blue-100 dark:bg-blue-800 dark:text-blue-200',
15
16
  green: 'text-green-500 bg-green-100 dark:bg-green-800 dark:text-green-200',
@@ -22,8 +23,7 @@ const colors = {
22
23
  // have a custom transition function that returns the desired transition
23
24
  let transitionFunc;
24
25
  $: transitionFunc = transitions[transition] ?? transitions.fade;
25
- let divClass;
26
- $: divClass = classNames('w-full max-w-xs p-4 text-gray-500 bg-white rounded-lg shadow dark:text-gray-400 dark:bg-gray-800', {
26
+ $: classDiv = classNames(divClass, {
27
27
  'absolute top-5 left-5': position == 'tl',
28
28
  'absolute top-5 right-5': position == 'tr',
29
29
  'absolute bottom-5 left-5': position == 'bl',
@@ -34,7 +34,7 @@ $: iconClass = classNames('inline-flex items-center justify-center flex-shrink-0
34
34
  </script>
35
35
 
36
36
  {#if visible}
37
- <div transition:transitionFunc={params} class={divClass} role="alert">
37
+ <div transition:transitionFunc={params} class={classDiv} role="alert">
38
38
  <div class="flex {$$slots.extra ? 'items-start' : 'items-center'}">
39
39
  {#if $$slots.icon}
40
40
  <div class={iconClass}><slot name="icon" /></div>
@@ -9,6 +9,7 @@ declare const __propDef: {
9
9
  params?: TransitionParamTypes;
10
10
  position?: 'tl' | 'tr' | 'bl' | 'br';
11
11
  visible?: boolean;
12
+ divClass?: string;
12
13
  };
13
14
  events: {
14
15
  [evt: string]: CustomEvent<any>;