Merge remote-tracking branch 'origin/main' into feature/slimmer-libs

This commit is contained in:
Jacob Overgaard
2023-03-13 10:20:17 +01:00
383 changed files with 18170 additions and 3333 deletions

View File

@@ -72,10 +72,7 @@ export class UmbNotificationContext {
* @return {*}
* @memberof UmbNotificationContext
*/
public peek(
color: UmbNotificationColor,
options: UmbNotificationOptions
): UmbNotificationHandler {
public peek(color: UmbNotificationColor, options: UmbNotificationOptions): UmbNotificationHandler {
return this._open({ color, ...options });
}
@@ -86,10 +83,7 @@ export class UmbNotificationContext {
* @return {*}
* @memberof UmbNotificationContext
*/
public stay(
color: UmbNotificationColor,
options: UmbNotificationOptions
): UmbNotificationHandler {
public stay(color: UmbNotificationColor, options: UmbNotificationOptions): UmbNotificationHandler {
return this._open({ ...options, color, duration: null });
}
}

View File

@@ -1,4 +1,4 @@
import { Meta } from '@storybook/addon-docs';
import { Meta } from '@storybook/blocks';
<Meta title="API/Notifications/Intro" />
@@ -18,7 +18,7 @@ Stays on the screen until dismissed by the user or custom code. Stay notificatio
The UmbNotification context can be used to open notifications.
```typescript
```ts
import { html, LitElement } from 'lit';
import { UmbLitElement } from '@umbraco-cms/element';
import type { UmbNotificationContext, UMB_NOTIFICATION_CONTEXT_ALIAS } from '@umbraco-cms/notification';
@@ -41,7 +41,7 @@ class MyElement extends UmbLitElement {
A notification is opened by calling one of the helper methods on the UmbNotificationContext. The methods will return an instance of UmbNotificationHandler.
```typescript
```ts
import { html, LitElement } from 'lit';
import { state } from 'lit/decorators.js';
import { UmbLitElement } from '@umbraco-cms/element';
@@ -84,7 +84,7 @@ The default layout will cover most cases, but there might be situations where we
### Custom layout element
```typescript
```ts
import { html, LitElement } from 'lit';
import { property } from 'lit/decorators.js';
import { UUITextStyles } from '@umbraco-ui/uui-css';
@@ -123,7 +123,7 @@ export class UmbNotificationLayoutCustom extends LitElement {
### Open notification with custom layout
```typescript
```ts
import { html, LitElement } from 'lit';
import { UmbContextInjectMixin } from '@umbraco-cms/context-api';
import type {