-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
199 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import Tonic from '@socketsupply/tonic' | ||
import { TonicDialog } from '@socketsupply/components/dialog' | ||
|
||
export class DialogShare extends TonicDialog { | ||
async click (e) { | ||
super.click(e) | ||
|
||
const el = Tonic.match(e.target, '[data-event]') | ||
if (!el) return | ||
|
||
const { event } = el.dataset | ||
|
||
if (event === 'share') { | ||
const app = this.props.parent | ||
} | ||
} | ||
|
||
render () { | ||
return this.html` | ||
<header> | ||
Share Code | ||
</header> | ||
<main> | ||
asdfsdf | ||
</main> | ||
<footer> | ||
<div></div> | ||
<tonic-button data-event="share">Share</tonic-button> | ||
</footer> | ||
` | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
dialog-share { | ||
display: grid; | ||
grid-template-rows: auto 1fr; | ||
max-width: 500px; | ||
min-height: 280px; | ||
display: grid; | ||
font-family: var(--tonic-monospace); | ||
} | ||
|
||
body.mobile dialog-share { | ||
width: 90vw !important; | ||
height: 50vh !important; | ||
} | ||
|
||
dialog-share header { | ||
height: 46px; | ||
text-align: center; | ||
padding: 14px; | ||
font-size: 12px; | ||
color: var(--tonic-secondary); | ||
} | ||
|
||
dialog-share footer { | ||
height: 50px; | ||
display: grid; | ||
grid-template-columns: 1fr auto; | ||
gap: 10px; | ||
padding: 0 16px; | ||
} | ||
|
||
dialog-share .centered { | ||
position: absolute; | ||
top: 0; left: 0; right: 0; bottom: 0; | ||
display: grid; | ||
justtify-content: center; | ||
align-content: center; | ||
} | ||
|
||
dialog-share .centered .message { | ||
display: inline-block; | ||
width: 80%; | ||
margin: auto; | ||
} | ||
|
||
dialog-share main { | ||
padding: 16px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters