-
-
Notifications
You must be signed in to change notification settings - Fork 121
/
BlockFooter.svelte
42 lines (35 loc) · 1.12 KB
/
BlockFooter.svelte
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<script>
import { BlockFooterClasses } from '../../shared/classes/BlockFooterClasses.js';
import { BlockFooterColors } from '../../shared/colors/BlockFooterColors.js';
import { useTheme } from '../shared/use-theme.js';
import { useThemeClasses } from '../shared/use-theme-classes.js';
import { useDarkClasses } from '../shared/use-dark-classes.js';
let className = undefined;
export { className as class };
let colorsProp = undefined;
export { colorsProp as colors };
export let ios = undefined;
export let material = undefined;
export let inset = undefined;
export let insetIos = undefined;
export let insetMaterial = undefined;
let theme;
theme = useTheme({}, (v) => (theme = v));
const dark = useDarkClasses();
$: isInset =
typeof inset === 'undefined'
? theme === 'ios'
? insetIos
: insetMaterial
: inset;
$: colors = BlockFooterColors(colorsProp, dark);
$: c = useThemeClasses(
{ ios, material },
BlockFooterClasses({ inset: isInset }, colors),
className,
(v) => (c = v)
);
</script>
<div class={c.base} {...$$restProps}>
<slot />
</div>