Skip to content

Commit 08bee55

Browse files
authored
feat(ac-menu-item): add target attribute (#134)
1 parent a9dfa08 commit 08bee55

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

core/src/components/molecules/ac-menu/ac-menu-item/ac-menu-item.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ export class AcMenu {
2424

2525
@Prop() href: string;
2626

27+
@Prop() target: string;
28+
2729
@Bind
2830
handleClick() {
2931
if (this.submenu) {
@@ -41,7 +43,7 @@ export class AcMenu {
4143
'ac-menu-item--hidden': this.hidden,
4244
}}
4345
>
44-
<a class="ac-menu-item__native" href={this.href} onClick={this.handleClick}>
46+
<a class="ac-menu-item__native" target={​ this.target ? this.target : "_self" }​ href={this.href}​ onClick={this.handleClick}​ >
4547
<span class="ac-menu-item__icon-start">
4648
<slot name="icon-start"/>
4749
</span>

0 commit comments

Comments
 (0)