mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 18:31:06 +00:00
fix(search): forward size prop to Search skeleton
Add deprecation notice for the `small` prop.
This commit is contained in:
parent
b5bd56318a
commit
6fc073c932
6 changed files with 75 additions and 37 deletions
|
@ -1,15 +1,23 @@
|
|||
<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--xl="{!small}"
|
||||
class:bx--search--sm="{small}"
|
||||
class:bx--search--sm="{size === 'sm' || small}"
|
||||
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