@djcali570/component-lib 0.0.5 → 0.0.6
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/README.md +23 -5
- package/dist/Accordion5.svelte +1 -7
- package/dist/Accordion5.svelte.d.ts +1 -5
- package/dist/index.d.ts +2 -0
- package/dist/types.d.ts +5 -0
- package/dist/types.js +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,8 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
Components:
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
## Accordion
|
|
6
|
+
|
|
7
|
+
Customize the accordion color scheme
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
import { Accordion5 } from '@djcali570/component-lib';
|
|
11
|
+
import type { Accordion5ColorScheme } from '@djcali570/component-lib';
|
|
12
|
+
|
|
13
|
+
let acs: Accordion5ColorScheme = {
|
|
14
|
+
bgColor: '#121212',
|
|
15
|
+
textColor: '#D6D6D6',
|
|
16
|
+
triggerColor: '#D6D6D6'
|
|
17
|
+
}
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Use of the Accordion component
|
|
21
|
+
```
|
|
22
|
+
<Accordion5 colorScheme={acs} title='My Title'>
|
|
23
|
+
{#snippet panel()}
|
|
24
|
+
<p>Accordion Contents</p>
|
|
25
|
+
{/Snippet}
|
|
26
|
+
</Accordion5>
|
|
27
|
+
```
|
package/dist/Accordion5.svelte
CHANGED
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { Snippet } from 'svelte';
|
|
3
|
-
|
|
4
|
-
// Define colorScheme type
|
|
5
|
-
interface Accordion5ColorScheme {
|
|
6
|
-
bgColor: string;
|
|
7
|
-
textColor: string;
|
|
8
|
-
triggerColor: string;
|
|
9
|
-
}
|
|
3
|
+
import type { Accordion5ColorScheme } from './types.js';
|
|
10
4
|
|
|
11
5
|
// Props with typed colorScheme
|
|
12
6
|
let {
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import type { Snippet } from 'svelte';
|
|
2
|
-
|
|
3
|
-
bgColor: string;
|
|
4
|
-
textColor: string;
|
|
5
|
-
triggerColor: string;
|
|
6
|
-
}
|
|
2
|
+
import type { Accordion5ColorScheme } from './types.js';
|
|
7
3
|
type $$ComponentProps = {
|
|
8
4
|
colorScheme?: Partial<Accordion5ColorScheme>;
|
|
9
5
|
title?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -3,4 +3,6 @@ import DropDown5 from "./DropDown5.svelte";
|
|
|
3
3
|
import Input5 from "./Input5.svelte";
|
|
4
4
|
import TimePicker5 from "./TimePicker5.svelte";
|
|
5
5
|
import Accordion5 from "./Accordion5.svelte";
|
|
6
|
+
import type { Accordion5ColorScheme } from "./types.js";
|
|
6
7
|
export { DatePicker5, Input5, DropDown5, TimePicker5, Accordion5 };
|
|
8
|
+
export type { Accordion5ColorScheme };
|
package/dist/types.d.ts
ADDED
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|