Skip to content

Commit

Permalink
Introduce Connect Modal
Browse files Browse the repository at this point in the history
  • Loading branch information
lucemans committed Feb 15, 2024
1 parent 9f854df commit bd95704
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
24 changes: 24 additions & 0 deletions packages/thorin-core/src/connect-modal/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { css, html, LitElement } from 'lit';
import { customElement, property } from 'lit/decorators.js';

@customElement('thorin-connect-modal')
export class ThorinConnectModal extends LitElement {
@property({ type: Boolean, reflect: true })
open = false;

static styles = css``;

render() {
return html`
<thorin-modal ?open="${this.open}">
<div>connect modal</div>
</thorin-modal>
`;
}
}

declare global {
interface HTMLElementTagNameMap {
'thorin-connect-modal': ThorinConnectModal;
}
}
1 change: 1 addition & 0 deletions packages/thorin-core/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export { ThorinAvatar } from './avatar';
export { ThorinButton } from './button';
export { ThorinConnectModal } from './connect-modal';
export { ThorinLabel } from './label';
export { ThorinModal } from './modal';
export { ThorinTag } from './tag';
Expand Down
8 changes: 8 additions & 0 deletions web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ <h2>Modals</h2>
<thorin-button onclick="opentestmodal()"
>Open Modal</thorin-button
>
<thorin-button onclick="openconnectmodal()"
>Open Connect Modal</thorin-button
>
</div>
</div>
</div>
Expand All @@ -110,11 +113,16 @@ <h2>Modals</h2>
</thorin-button>
</div>
</thorin-modal>
<thorin-connect-modal id="connectmodal">
</thorin-connect-modal>
<script src="./index.ts" type="module"></script>
<script>
function opentestmodal() {
document.getElementById("testmodal").open = true;
}
function openconnectmodal() {
document.getElementById("connectmodal").open = true;
}

let height = 5;
function randomizebig() {
Expand Down

0 comments on commit bd95704

Please sign in to comment.