🏷️ link interface added
This commit is contained in:
parent
08c3f55db2
commit
996f20136a
46
src/components/button/IVLink.type.ts
Normal file
46
src/components/button/IVLink.type.ts
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
import type { RouteLocationRaw } from "vue-router";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Interface representing a navigational link component.
|
||||||
|
* This can be used for both internal routing (via `to`) and external links (via `href`).
|
||||||
|
*/
|
||||||
|
export default interface ILink {
|
||||||
|
/**
|
||||||
|
* The text label displayed for the link.
|
||||||
|
*/
|
||||||
|
label: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Internal route destination using Vue Router's RouteLocationRaw.
|
||||||
|
* Optional – used for client-side navigation.
|
||||||
|
*/
|
||||||
|
to?: RouteLocationRaw;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* External URL for the link.
|
||||||
|
* Optional – used for standard anchor navigation.
|
||||||
|
*/
|
||||||
|
href?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Optional icon name or path to be displayed alongside the label.
|
||||||
|
*/
|
||||||
|
icon?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Specifies where to open the linked document (e.g., "_blank", "_self").
|
||||||
|
* Optional – applies to external links.
|
||||||
|
*/
|
||||||
|
target?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If true, the link is disabled and not clickable.
|
||||||
|
*/
|
||||||
|
disabled?: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If true, the icon is displayed on the right side of the label.
|
||||||
|
* Defaults to false (icon on the left).
|
||||||
|
*/
|
||||||
|
iconRight?: boolean;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user