carbon-components-svelte/src/Search/Search.Skeleton.svelte
Eric Liu 6fc073c932 fix(search): forward size prop to Search skeleton
Add deprecation notice for the `small` prop.
2020-10-22 18:55:57 -07:00

29 lines
673 B
Svelte

<script>
/**
* @deprecated this prop will be removed in the next major release
* Set to `true` to use the small variant
* @type {boolean} [small=false]
*/
export let small = false;
/**
* Specify the size of the search input
* @type {"sm" | "lg" | "xl"} [size="xl"]
*/
export let size = "xl";
</script>
<div
class:bx--skeleton="{true}"
class:bx--search--sm="{size === 'sm' || small}"
class:bx--search--lg="{size === 'lg'}"
class:bx--search--xl="{size === 'xl'}"
{...$$restProps}
on:click
on:mouseover
on:mouseenter
on:mouseleave
>
<span class:bx--label="{true}"></span>
<div class:bx--search-input="{true}"></div>
</div>