v-if="iconPath"
type="mdi"
:path="iconPath"
- size="1.25em"
- class="mr-1"
+ :size="iconSize"
+ :class="{ 'mr-1': label }"
></SvgIcon>
- <span>{{ label }}</span>
+ <span v-if-label>{{ label }}</span>
</button>
</template>
defineProps({
iconPath: String,
+ iconSize: {
+ type: String,
+ default: "1.25em",
+ },
label: String,
});
</script>
--- /dev/null
+<template>
+ <form class="flex" v-on:submit.prevent="search">
+ <input
+ type="text"
+ class="rounded rounded-r-none border border-theme-border bg-theme-background-elevated px-3 py-2"
+ placeholder="Search"
+ />
+ <Button
+ :iconPath="mdilMagnify"
+ iconSize="1.75em"
+ class="rounded-l-none border border-l-0 border-theme-border"
+ />
+ </form>
+</template>
+
+<script setup>
+import Button from "./Button.vue";
+import { mdilMagnify } from "@mdi/light-js";
+
+function search() {
+ console.log("searching...");
+}
+</script>