mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 19:46:36 +00:00
feat(search): allow custom search icon
Allows consumers to render a different Carbon icon instead of the default Search16 icon.
This commit is contained in:
parent
95ce87554b
commit
b4664507c5
5 changed files with 46 additions and 20 deletions
|
@ -7939,6 +7939,15 @@
|
|||
"constant": false,
|
||||
"reactive": false
|
||||
},
|
||||
{
|
||||
"name": "icon",
|
||||
"kind": "let",
|
||||
"description": "Specify the icon from `carbon-icons-svelte` to render",
|
||||
"type": "typeof import(\"carbon-icons-svelte\").CarbonIcon",
|
||||
"isFunction": false,
|
||||
"constant": false,
|
||||
"reactive": false
|
||||
},
|
||||
{
|
||||
"name": "id",
|
||||
"kind": "let",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<script>
|
||||
import Query16 from "carbon-icons-svelte/lib/Query16";
|
||||
import { Search } from "carbon-components-svelte";
|
||||
import Preview from "../../components/Preview.svelte";
|
||||
</script>
|
||||
|
@ -43,6 +44,10 @@ The "clear" event is dispatched when clicking the "X" button in the search input
|
|||
|
||||
<Search disabled />
|
||||
|
||||
### Custom search icon
|
||||
|
||||
<Search icon={Query16} />
|
||||
|
||||
### Skeleton
|
||||
|
||||
<Search skeleton />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue