Skip to content

Commit

Permalink
fix: app type
Browse files Browse the repository at this point in the history
  • Loading branch information
gavmck committed Feb 21, 2024
1 parent 6158fcc commit 65aa326
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions components/composition/App/App.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@ import { customElement, property } from 'lit/decorators.js';

import { JSXCustomElement } from '../../../types/jsx-custom-element';

export interface AppAttributes {
header?: 'sticky' | 'static';
}

@customElement('diamond-app')
export class App extends LitElement {
@property({ reflect: true }) header: 'sticky' | 'static' = 'static';
@property({ reflect: true }) header?: 'sticky' | 'static' = 'static';

render() {
return html`
Expand All @@ -24,14 +28,14 @@ export class App extends LitElement {

declare global {
interface HTMLElementTagNameMap {
'diamond-app': App;
'diamond-app': AppAttributes;
}
}

declare module 'react' {
namespace JSX {
interface IntrinsicElements {
'diamond-app': JSXCustomElement;
'diamond-app': AppAttributes & JSXCustomElement;
}
}
}

0 comments on commit 65aa326

Please sign in to comment.