From 47c34e23957ffdd078fe1c7aae6f3aee0e11c710 Mon Sep 17 00:00:00 2001 From: Conor Mack Date: Thu, 27 Feb 2020 10:03:49 +0000 Subject: [PATCH 1/2] Testing list items by passing down a event handler through context for selecting items --- .../src/Checkbox/Checkbox.svelte | 14 +++-- .../src/Common/Formfield.svelte | 6 +- .../src/List/List.svelte | 51 ++++++++------- .../src/List/ListItem.svelte | 62 +++++++++++++------ .../src/Radiobutton/Radiobutton.svelte | 10 +-- .../src/Test/TestApp.svelte | 4 -- .../src/Test/props.js | 15 ++--- 7 files changed, 92 insertions(+), 70 deletions(-) diff --git a/packages/materialdesign-components/src/Checkbox/Checkbox.svelte b/packages/materialdesign-components/src/Checkbox/Checkbox.svelte index bfe861f373..d02f2e83ad 100644 --- a/packages/materialdesign-components/src/Checkbox/Checkbox.svelte +++ b/packages/materialdesign-components/src/Checkbox/Checkbox.svelte @@ -1,5 +1,5 @@ -
  • +
  • {#if leadingIcon} - {#if inputElement} - {#if inputElement === 'radiobutton'} - - {:else if inputElement === 'checkbox'} - + {#if listProps} + {#if listProps.inputElement === 'radiobutton'} + + {:else if listProps.inputElement === 'checkbox'} + {/if} {:else if trailingIcon} diff --git a/packages/materialdesign-components/src/Radiobutton/Radiobutton.svelte b/packages/materialdesign-components/src/Radiobutton/Radiobutton.svelte index 9b4c475241..f2fce510d1 100644 --- a/packages/materialdesign-components/src/Radiobutton/Radiobutton.svelte +++ b/packages/materialdesign-components/src/Radiobutton/Radiobutton.svelte @@ -1,10 +1,11 @@