Skip to content
This repository was archived by the owner on Sep 26, 2022. It is now read-only.

Commit 3f5ce05

Browse files
Merge pull request #176 from TheComputerM/fix/select-issue
fix: select issue
2 parents b6f4ba4 + d08f822 commit 3f5ce05

File tree

9 files changed

+18
-16
lines changed

9 files changed

+18
-16
lines changed

packages/docs/src/playground/Alert.svelte

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,17 @@
2929
visible: true,
3030
icon: false,
3131
coloredBorder: false,
32-
border: [],
33-
color: ['primary'],
32+
border: controls.border.items[0],
33+
color: controls.color.items[0],
3434
};
3535
</script>
3636

3737
<Playground {variants} {controls} bind:values>
3838
<Alert
39-
class="{values.color[0]}-{textColor(values.variants) ? 'text' : 'color'}"
39+
class="{values.color}-{textColor(values.variants) ? 'text' : 'color'}"
4040
dismissible={values.dismissible}
4141
bind:visible={values.visible}
42-
border={values.border[0]}
42+
border={values.border}
4343
coloredBorder={values.coloredBorder}
4444
{...formatVariant(values.variants)}>
4545
<span slot="icon">

packages/docs/src/playground/AppBar.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717
let values = {
1818
variants: [],
1919
collapsed: false,
20-
color: [],
20+
color: controls.color.items[0],
2121
};
2222
</script>
2323

2424
<Playground {variants} {controls} bind:values>
2525
<AppBar
26-
class="{values.color[0]}-color"
26+
class="{values.color}-color"
2727
collapsed={values.collapsed}
2828
{...formatVariant(values.variants)}>
2929
<span slot="icon">

packages/docs/src/playground/Avatar.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@
1818
size: 48,
1919
tile: false,
2020
icon: false,
21-
color: ['primary'],
21+
color: 'primary',
2222
};
2323
</script>
2424

2525
<Playground {controls} bind:values>
26-
<Avatar tile={values.tile} size="{values.size}px" class="{values.color[0]}-color">
26+
<Avatar tile={values.tile} size="{values.size}px" class="{values.color}-color">
2727
{#if values.icon}
2828
<Icon path={mdiHome} />
2929
{:else}MS{/if}

packages/docs/src/playground/Breadcrumbs.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
1414
let values = {
1515
large: false,
16-
divider: ['/'],
16+
divider: '/',
1717
};
1818
1919
const items = [

packages/docs/src/playground/Chip.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@
3535
active: true,
3636
avatar: false,
3737
icon: items[0].value,
38-
size: ['default'],
38+
size: 'default',
3939
};
4040
</script>
4141

4242
<Playground {controls} {variants} bind:values>
4343
<Chip
44-
size={values.size[0]}
44+
size={values.size}
4545
close={values.close}
4646
bind:active={values.active}
4747
{...formatVariant(values.variants)}>

packages/docs/src/playground/Icon.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
let values = {
2424
size: 24,
2525
icon: mdiPlus,
26-
color: [],
26+
color: 'purple',
2727
};
2828
</script>
2929

packages/docs/src/playground/NavigationDrawer.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
let values = {
2020
mini: false,
2121
right: false,
22-
color: ['teal'],
22+
color: 'teal',
2323
};
2424
</script>
2525

packages/svelte-materialify/src/components/Icon/Icon.svelte

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
export let path = null;
1515
export let label = null;
1616
export let style = null;
17+
$: {
18+
width = size;
19+
height = size;
20+
}
1721
</script>
1822

1923
<style type="scss" src="./Icon.scss" global>

packages/svelte-materialify/src/components/ItemGroup/ItemGroup.svelte

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,7 @@
3333
} else if (value.length < max) value = [...value, val];
3434
} else if (value === val) {
3535
if (!mandatory) value = null;
36-
} else if (typeof (val) === 'number') {
37-
value = val;
38-
} else value = [val];
36+
} else value = val;
3937
},
4038
register: (setValue) => {
4139
const u = valueStore.subscribe((val) => {

0 commit comments

Comments
 (0)