-
-
Notifications
You must be signed in to change notification settings - Fork 286
/
index.svelte
43 lines (36 loc) · 1.19 KB
/
index.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
43
<button
use:useActions={use}
use:forwardEvents
class="mdc-button {className}"
class:mdc-button--raised={variant === 'raised'}
class:mdc-button--unelevated={variant === 'unelevated'}
class:mdc-button--outlined={variant === 'outlined'}
class:mdc-button--dense={dense}
use:Ripple={[ripple, false]}
{...exclude($$props, ['use', 'class', 'ripple', 'variant', 'dense'])}
><slot></slot></button>
<script context="module">
import Label from '../common/Label';
import Icon from '../common/Icon';
export {Label, Icon};
</script>
<script>
import {setContext} from 'svelte';
import {current_component} from 'svelte/internal';
import {forwardEventsBuilder} from '../forwardEvents';
import {exclude} from '../exclude';
import {useActions} from '../useActions';
import Ripple from '../ripple';
const forwardEvents = forwardEventsBuilder(current_component);
export let use = [];
let className = '';
export {className as class};
export let ripple = true;
export let variant = '';
export let dense = false;
setContext('SMUI:labelContext', 'button');
setContext('SMUI:iconContext', 'button');
</script>
<style lang="scss" global>
@import "@material/button/mdc-button";
</style>