2024-08-05 22:28:46 +00:00
|
|
|
<style>
|
|
|
|
|
div {
|
2026-02-19 20:21:24 +00:00
|
|
|
mask-repeat: no-repeat;
|
2024-08-05 22:28:46 +00:00
|
|
|
mask-size: 100% 100%;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
|
2024-08-05 21:45:16 +00:00
|
|
|
<script lang="ts">
|
2025-02-04 01:21:46 +00:00
|
|
|
const {
|
|
|
|
|
icon,
|
|
|
|
|
size = 5,
|
|
|
|
|
...restProps
|
|
|
|
|
}: {
|
2025-02-04 00:37:14 +00:00
|
|
|
icon: string
|
2025-02-04 01:21:46 +00:00
|
|
|
size?: number
|
|
|
|
|
class?: string
|
|
|
|
|
} = $props()
|
2024-08-05 21:45:16 +00:00
|
|
|
|
|
|
|
|
const px = size * 4
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<div
|
2025-02-04 00:37:14 +00:00
|
|
|
class="inline-block {restProps.class}"
|
2025-09-10 22:26:39 +00:00
|
|
|
style="mask-image: url({icon}); width: {px}px; height: {px}px; min-width: {px}px; min-height: {px}px; background-color: currentcolor;">
|
2025-02-03 23:01:42 +00:00
|
|
|
</div>
|