-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Added horizontal menu and menu item #3
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,3 +23,4 @@ package-lock.json | |
/.node_modules.ember-try/ | ||
/bower.json.ember-try | ||
/package.json.ember-try | ||
.idea |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import Component from '@ember/component'; | ||
|
||
export default Component.extend({ | ||
actions: { | ||
doAction(){ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. let's standardise this action name like onClick, onHover or similar |
||
if (this.get('applyAction')) { | ||
this.get('applyAction')(this.action, this.pipelineId); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this.pipelineId ? 😄 |
||
} | ||
} | ||
} | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import Component from '@ember/component'; | ||
|
||
export default Component.extend({ | ||
}) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.horizontal-dropdown-item{ | ||
color: $themeTitlePrimaryColor; | ||
} | ||
li:hover{ | ||
background: $themeHoverColor; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
.pointed-dropdown::before { | ||
position: absolute; | ||
top: -7px; | ||
left: 11px; | ||
display: inline-block; | ||
border-right: 7px solid transparent; | ||
border-bottom: 7px solid $themeFifthGrey; | ||
border-left: 7px solid transparent; | ||
border-bottom-color: $themeFifthGrey; | ||
content: ''; | ||
} | ||
.pointed-dropdown::after { | ||
position: absolute; | ||
top: -6px; | ||
left: 10px; | ||
display: inline-block; | ||
border-right: 6px solid transparent; | ||
border-bottom: 6px solid white; | ||
border-left: 6px solid transparent; | ||
content: ''; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<li class="horizontal-dropdown-item pt5 pl30 pb5 pr8" {{action "doAction"}}>{{title}}</li> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<ul class ="q-card-dropdown-menu dropdown-menu pointed-dropdown"> | ||
{{yield (hash | ||
menu=(component "q-horizontal-menu-item" title=title)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if title is null? |
||
}} | ||
</ul> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default } from 'space-ui/components/s-horizontal-menu-item'; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default } from 'space-ui/components/s-horizontal-menu'; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Horizontal menu | ||
|
||
<p>To create a dropdown menu.</p> | ||
|
||
{{#docs-demo as |demo|}} | ||
{{#demo.example name='demo-horizontal-menu-basic.hbs'}} | ||
|
||
|
||
{{#s-horizontal-menu as |m| | ||
{{m.menu title="title" applyAction=(action "onMenuClick") | ||
action=(action "itemAction") pipelineId=pipelineId}} | ||
{{/s-horizontal-menu}} | ||
|
||
{{/demo.example}} | ||
|
||
{{demo.snippet 'demo-horizontal-menu-basic.hbs'}} | ||
{{/docs-demo}} | ||
|
||
| Property | Description | Type | Default | | ||
| ---------- | ---------------------------------------------------------------------------- | ------- | ------- | | ||
| title | Name of the menu item | string | "" | | ||
| action | Action to be performed on clicking an item from the menu | String | "" | | ||
| pipelineID | Id of the unique identifier | String | "" | | ||
| applyAction | Generic action that will call the "action provided" | string | "" | | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generate this file using ember g component
This component will not work as it doesnt have boilerplate code required for addon. like importing layout