Skip to content

Commit

Permalink
docs(ui5-message-strip): improve documentation (#7917)
Browse files Browse the repository at this point in the history
* docs(ui5-message-strip): improve documentation

* docs(ui5-message-strip): reflect review comments
  • Loading branch information
niyap authored Nov 28, 2023
1 parent 9d6ae8d commit 96633f4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 37 deletions.
39 changes: 10 additions & 29 deletions packages/main/src/MessageStrip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import "@ui5/webcomponents-icons/dist/error.js";
import "@ui5/webcomponents-icons/dist/alert.js";
import MessageStripDesign from "./types/MessageStripDesign.js";
import MessageStripTemplate from "./generated/templates/MessageStripTemplate.lit.js";
import type { IIcon } from "./Interfaces.js";
import Icon from "./Icon.js";
import Button from "./Button.js";
import {
Expand Down Expand Up @@ -73,12 +74,13 @@ type DesignTypeAnnouncemnt = Record<MessageStripDesign, string>;
* <code>import "@ui5/webcomponents/dist/MessageStrip";</code>
*
* @constructor
* @author SAP SE
* @alias sap.ui.webc.main.MessageStrip
* @extends sap.ui.webc.base.UI5Element
* @tagname ui5-message-strip
* @extends UI5Element
* @public
* @since 0.9.0
* @slot {Node[]} default
* Defines the text of the component.
* <br><br>
* <b>Note:</b> Although this slot accepts HTML Elements, it is strongly recommended that you only use text in order to preserve the intended design.
*/
@customElement({
tag: "ui5-message-strip",
Expand All @@ -92,7 +94,6 @@ type DesignTypeAnnouncemnt = Record<MessageStripDesign, string>;
* Fired when the close button is pressed either with a
* click/tap or by using the Enter or Space key.
*
* @event sap.ui.webc.main.MessageStrip#close
* @public
*/
@event("close")
Expand All @@ -101,9 +102,7 @@ class MessageStrip extends UI5Element {
/**
* Defines the component type.
*
* @type {sap.ui.webc.main.types.MessageStripDesign}
* @name sap.ui.webc.main.MessageStrip.prototype.design
* @defaultvalue "Information"
* @default "Information"
* @public
* @since 1.0.0-rc.15
*/
Expand All @@ -117,9 +116,7 @@ class MessageStrip extends UI5Element {
* Defines whether the MessageStrip will show an icon in the beginning.
* You can directly provide an icon with the <code>icon</code> slot. Otherwise, the default icon for the type will be used.
*
* @type {boolean}
* @name sap.ui.webc.main.MessageStrip.prototype.hideIcon
* @defaultvalue false
* @default false
* @public
* @since 1.0.0-rc.15
*/
Expand All @@ -129,25 +126,12 @@ class MessageStrip extends UI5Element {
/**
* Defines whether the MessageStrip renders close button.
*
* @type {boolean}
* @name sap.ui.webc.main.MessageStrip.prototype.hideCloseButton
* @defaultvalue false
* @default false
* @public
*/
@property({ type: Boolean })
hideCloseButton!: boolean;

/**
* Defines the text of the component.
* <br><br>
* <b>Note:</b> Although this slot accepts HTML Elements, it is strongly recommended that you only use text in order to preserve the intended design.
*
* @type {Node[]}
* @name sap.ui.webc.main.MessageStrip.prototype.default
* @slot
* @public
*/

/**
* Defines the content to be displayed as graphical element within the component.
* <br><br>
Expand All @@ -157,13 +141,10 @@ class MessageStrip extends UI5Element {
*
* See all the available icons in the <ui5-link target="_blank" href="https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html">Icon Explorer</ui5-link>.
*
* @type {sap.ui.webc.main.IIcon}
* @name sap.ui.webc.main.MessageStrip.prototype.icon
* @slot
* @public
*/
@slot()
icon!: Array<Icon>;
icon!: Array<IIcon>;

static i18nBundle: I18nBundle;

Expand Down
8 changes: 0 additions & 8 deletions packages/main/src/types/MessageStripDesign.ts
Original file line number Diff line number Diff line change
@@ -1,38 +1,30 @@
/**
* MessageStrip designs.
*
* @readonly
* @enum {string}
* @public
* @author SAP SE
* @alias sap.ui.webc.main.types.MessageStripDesign
*/
enum MessageStripDesign {
/**
* Message should be just an information
* @public
* @type {Information}
*/
Information = "Information",

/**
* Message is a success message
* @public
* @type {Positive}
*/
Positive = "Positive",

/**
* Message is an error
* @public
* @type {Negative}
*/
Negative = "Negative",

/**
* Message is a warning
* @public
* @type {Warning}
*/
Warning = "Warning",
}
Expand Down

0 comments on commit 96633f4

Please sign in to comment.