Skip to content

Commit f8bf017

Browse files
committed
Add missing files
1 parent 3875e3a commit f8bf017

File tree

5 files changed

+92
-0
lines changed

5 files changed

+92
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
meta:
3+
title: Empty Dialog
4+
description:
5+
layout: component
6+
---
7+
8+
```html:preview
9+
<zn-empty-dialog></zn-empty-dialog>
10+
```
11+
12+
## Examples
13+
14+
### First Example
15+
16+
TODO
17+
18+
### Second Example
19+
20+
TODO
21+
22+
[component-metadata:zn-empty-dialog]
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import {property} from 'lit/decorators.js';
2+
import {type CSSResultGroup, html, unsafeCSS} from 'lit';
3+
import {LocalizeController} from '../../utilities/localize';
4+
import {watch} from '../../internal/watch';
5+
import ZincElement from '../../internal/zinc-element';
6+
7+
import styles from './empty-dialog.scss';
8+
9+
/**
10+
* @summary Short summary of the component's intended use.
11+
* @documentation https://zinc.style/components/empty-dialog
12+
* @status experimental
13+
* @since 1.0
14+
*
15+
* @dependency zn-example
16+
*
17+
* @event zn-event-name - Emitted as an example.
18+
*
19+
* @slot - The default slot.
20+
* @slot example - An example slot.
21+
*
22+
* @csspart base - The component's base wrapper.
23+
*
24+
* @cssproperty --example - An example CSS custom property.
25+
*/
26+
export default class ZnEmptyDialog extends ZincElement {
27+
static styles: CSSResultGroup = unsafeCSS(styles);
28+
29+
// @ts-expect-error unused property
30+
private readonly localize = new LocalizeController(this);
31+
32+
/** An example attribute. */
33+
@property() attr = 'example';
34+
35+
@watch('example')
36+
handleExampleChange() {
37+
// do something
38+
}
39+
40+
render() {
41+
return html` <slot></slot> `;
42+
}
43+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
@use "../../wc";
2+
3+
:host {
4+
display: block;
5+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import '../../../dist/zn.min.js';
2+
import { expect, fixture, html } from '@open-wc/testing';
3+
4+
describe('<zn-empty-dialog>', () => {
5+
it('should render a component', async () => {
6+
const el = await fixture(html` <zn-empty-dialog></zn-empty-dialog> `);
7+
8+
expect(el).to.exist;
9+
});
10+
});
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import ZnEmptyDialog from './empty-dialog.component';
2+
3+
export * from './empty-dialog.component';
4+
export default ZnEmptyDialog;
5+
6+
ZnEmptyDialog.define('zn-empty-dialog');
7+
8+
declare global {
9+
interface HTMLElementTagNameMap {
10+
'zn-empty-dialog': ZnEmptyDialog;
11+
}
12+
}

0 commit comments

Comments
 (0)