Improve JSDoc for some components

Apply suggestions from code review

Co-authored-by: Nelson Chan <chakflying@hotmail.com>
This commit is contained in:
Matthew Nickson 2022-06-02 10:42:37 +01:00 committed by GitHub
parent 213aca4fc3
commit 2170229031
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 9 deletions

View File

@ -58,7 +58,7 @@ export default {
this.modal.show();
},
/**
* @emits string A string that simply says "yes"
* @emits "yes" - Notify the parent when Yes is pressed
*/
yes() {
this.$emit("yes");

View File

@ -17,7 +17,7 @@
export default {
props: {
/** Size of the heart beat bar */
/** Size of the heartbeat bar */
size: {
type: String,
default: "big",
@ -27,7 +27,7 @@ export default {
type: Number,
required: true,
},
/** Array of the monitors heart beats */
/** Array of the monitors heartbeats */
heartbeatList: {
type: Array,
default: null,
@ -171,7 +171,8 @@ export default {
},
/**
* Get the title of the beat
* Get the title of the beat.
* Used as the hover tooltip on the heartbeat bar.
* @param {Object} beat Beat to get title from
* @returns {string}
*/

View File

@ -34,7 +34,7 @@ export default {
type: String,
default: ""
},
/** Maximum lenght of the input */
/** Maximum length of the input */
maxlength: {
type: Number,
default: 255

View File

@ -270,7 +270,7 @@ export default {
}
},
/**
* Set colour of text
* Get colour of text inside the tag
* @param {Object} option Object representing color choice. If
* option.color is set, the text color will be white, else it
* be chosen based upon application theme
@ -357,7 +357,7 @@ export default {
this.$root.getSocket().emit("deleteMonitorTag", tagId, monitorId, value, resolve);
});
},
/** Called as user types input */
/** Handle pressing Enter key when inside the modal */
onEnter() {
if (!this.validateDraftTag.invalid) {
this.addDraftTag();

View File

@ -29,12 +29,12 @@
<script>
export default {
props: {
/** Heading to use */
/** Heading of the Section */
heading: {
type: String,
default: "",
},
/** Should the selection be open by default? */
/** Should the section be open by default? */
defaultOpen: {
type: Boolean,
default: false,