Skip to content
Snippets Groups Projects
Commit 4186fcd5 authored by Eugen Ciur's avatar Eugen Ciur
Browse files

NewFolder Component

parent 926b8fc5
Branches
No related tags found
No related merge requests found
......@@ -9,8 +9,15 @@
{{yield}}
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-primary">{{@actionTitle}}</button>
<button
type="button"
class="btn btn-secondary"
data-bs-dismiss="modal">Cancel
</button>
<button
type="button"
class="btn btn-primary"
{{on "click" @onSubmit}}>{{@actionTitle}}</button>
</div>
</div>
</div>
......
<Modal::Base
@title="Create Folder"
@actionTitle="Create"
@onSubmit={{this.onSubmit}}
...attributes
>
<label for="folder-title" class="form-label">Folder title:</label>
......
import Component from '@glimmer/component';
import { tracked } from '@glimmer/tracking';
import { action } from '@ember/object';
export default class NewFolderComponent extends Component {
@tracked title = '';
@action
onSubmit() {
console.log(`title ${this.title}`);
}
}
......@@ -14,4 +14,5 @@
Documents and Folders will be displayed here!
<Modal::NewFolder id="new-folder"/>
\ No newline at end of file
<Modal::NewFolder
id="new-folder" />
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment