Skip to content
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

docs(ui5-message-strip): improve documentation #7917

Merged
merged 3 commits into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading