Skip to content

Commit

Permalink
docs: update snippet tags for details Lit examples (#4048)
Browse files Browse the repository at this point in the history
  • Loading branch information
web-padawan authored Jan 2, 2025
1 parent a1054de commit 1e375ec
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions frontend/demo/component/details/details-content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { css, html, LitElement } from 'lit';
import { customElement } from 'lit/decorators.js';
import { applyTheme } from 'Frontend/generated/theme';

// tag::snippet[]
@customElement('details-content')
export class Example extends LitElement {
static override styles = css`
Expand All @@ -23,6 +22,7 @@ export class Example extends LitElement {
}

protected override render() {
// tag::snippet[]
return html`
<vaadin-details summary="Analytics" opened>
<vaadin-vertical-layout>
Expand All @@ -47,6 +47,6 @@ export class Example extends LitElement {
</vaadin-vertical-layout>
</vaadin-details>
`;
// end::snippet[]
}
}
// end::snippet[]
4 changes: 2 additions & 2 deletions frontend/demo/component/details/details-disabled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { html, LitElement } from 'lit';
import { customElement } from 'lit/decorators.js';
import { applyTheme } from 'Frontend/generated/theme';

// tag::snippet[]
@customElement('details-disabled')
export class Example extends LitElement {
protected override createRenderRoot() {
Expand All @@ -15,6 +14,7 @@ export class Example extends LitElement {
}

protected override render() {
// tag::snippet[]
return html`
<vaadin-details summary="Members (8)" disabled>
<ul>
Expand All @@ -29,6 +29,6 @@ export class Example extends LitElement {
</ul>
</vaadin-details>
`;
// end::snippet[]
}
}
// end::snippet[]
4 changes: 2 additions & 2 deletions frontend/demo/component/details/details-filled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { html, LitElement } from 'lit';
import { customElement } from 'lit/decorators.js';
import { applyTheme } from 'Frontend/generated/theme';

// tag::snippet[]
@customElement('details-filled')
export class Example extends LitElement {
protected override createRenderRoot() {
Expand All @@ -15,6 +14,7 @@ export class Example extends LitElement {
}

protected override render() {
// tag::snippet[]
return html`
<vaadin-details summary="Members (8)" opened theme="filled">
<ul>
Expand All @@ -29,6 +29,6 @@ export class Example extends LitElement {
</ul>
</vaadin-details>
`;
// end::snippet[]
}
}
// end::snippet[]
4 changes: 2 additions & 2 deletions frontend/demo/component/details/details-reverse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { html, LitElement } from 'lit';
import { customElement } from 'lit/decorators.js';
import { applyTheme } from 'Frontend/generated/theme';

// tag::snippet[]
@customElement('details-reverse')
export class Example extends LitElement {
protected override createRenderRoot() {
Expand All @@ -15,6 +14,7 @@ export class Example extends LitElement {
}

protected override render() {
// tag::snippet[]
return html`
<vaadin-details summary="Members (8)" opened theme="reverse">
<ul>
Expand All @@ -29,6 +29,6 @@ export class Example extends LitElement {
</ul>
</vaadin-details>
`;
// end::snippet[]
}
}
// end::snippet[]
4 changes: 2 additions & 2 deletions frontend/demo/component/details/details-small.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { html, LitElement } from 'lit';
import { customElement } from 'lit/decorators.js';
import { applyTheme } from 'Frontend/generated/theme';

// tag::snippet[]
@customElement('details-small')
export class Example extends LitElement {
protected override createRenderRoot() {
Expand All @@ -15,6 +14,7 @@ export class Example extends LitElement {
}

protected override render() {
// tag::snippet[]
return html`
<vaadin-details summary="Members (8)" opened theme="small">
<ul>
Expand All @@ -29,6 +29,6 @@ export class Example extends LitElement {
</ul>
</vaadin-details>
`;
// end::snippet[]
}
}
// end::snippet[]
4 changes: 2 additions & 2 deletions frontend/demo/component/details/details-summary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import { getCountries } from 'Frontend/demo/domain/DataService';
import type Country from 'Frontend/generated/com/vaadin/demo/domain/Country';
import { applyTheme } from 'Frontend/generated/theme';

// tag::snippet[]
@customElement('details-summary')
export class Example extends LitElement {
protected override createRenderRoot() {
Expand All @@ -39,6 +38,7 @@ export class Example extends LitElement {
}

protected override render() {
// tag::snippet[]
return html`
<vaadin-details opened>
<vaadin-details-summary slot="summary">
Expand Down Expand Up @@ -77,6 +77,6 @@ export class Example extends LitElement {
</vaadin-form-layout>
</vaadin-details>
`;
// end::snippet[]
}
}
// end::snippet[]

0 comments on commit 1e375ec

Please sign in to comment.