Controls
Link
Adds a Link panel in the Makeswift builder to visually edit a LinkValue
prop.
Params
label
string
default: "On click"Text for the panel label in the Makeswift builder.
Prop type
The Link control passes an object of type LinkValue
to your component.
type LinkValue = {
href: string
target?: "_blank" | "_self"
}
If no value is set in the builder, your component receives { href: '#' }
.
Example
The following example adds an Link control to the link
prop of a Button component.
.makeswift.ts
is a naming convention for organizing Makeswift registration
code. Read more about this pattern
here.