mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-19 11:59:34 +00:00
chore: v11 Search
This commit is contained in:
parent
164ce79cb3
commit
27da0e691c
7 changed files with 19 additions and 18 deletions
|
@ -13,9 +13,9 @@
|
|||
|
||||
/**
|
||||
* Specify the size of the search input
|
||||
* @type {"sm" | "lg" | "xl"}
|
||||
* @type {"sm" | "md" | "lg"}
|
||||
*/
|
||||
export let size = "xl";
|
||||
export let size = "md";
|
||||
|
||||
/** Specify the class name passed to the outer div element */
|
||||
export let searchClass = "";
|
||||
|
@ -96,8 +96,8 @@
|
|||
class:bx--search--light="{light}"
|
||||
class:bx--search--disabled="{disabled}"
|
||||
class:bx--search--sm="{size === 'sm'}"
|
||||
class:bx--search--md="{size === 'md'}"
|
||||
class:bx--search--lg="{size === 'lg'}"
|
||||
class:bx--search--xl="{size === 'xl'}"
|
||||
class:bx--search--expandable="{expandable}"
|
||||
class:bx--search--expanded="{expanded}"
|
||||
class="{searchClass}"
|
||||
|
@ -166,7 +166,8 @@
|
|||
dispatch('clear');
|
||||
}}"
|
||||
>
|
||||
<svelte:component this="{Close}" size="{size === 'xl' ? 20 : 16}" />
|
||||
<Close />
|
||||
<!-- <svelte:component this="{Close}" size="{size === 'xl' ? 20 : 16}" /> -->
|
||||
</button>
|
||||
</div>
|
||||
{/if}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<script>
|
||||
/**
|
||||
* Specify the size of the search input
|
||||
* @type {"sm" | "lg" | "xl"}
|
||||
* @type {"sm" | "md" | "lg"}
|
||||
*/
|
||||
export let size = "xl";
|
||||
export let size = "md";
|
||||
</script>
|
||||
|
||||
<!-- svelte-ignore a11y-mouse-events-have-key-events -->
|
||||
|
@ -11,8 +11,8 @@
|
|||
<div
|
||||
class:bx--skeleton="{true}"
|
||||
class:bx--search--sm="{size === 'sm'}"
|
||||
class:bx--search--md="{size === 'md'}"
|
||||
class:bx--search--lg="{size === 'lg'}"
|
||||
class:bx--search--xl="{size === 'xl'}"
|
||||
{...$$restProps}
|
||||
on:click
|
||||
on:mouseover
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue