-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: implement a few different glass types
- Loading branch information
1 parent
33b7d57
commit 342cabd
Showing
21 changed files
with
2,792 additions
and
150 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
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,54 @@ | ||
import { Component, For, createEffect, createSignal, onMount } from "solid-js"; | ||
import { glasses, names } from "./glasses"; | ||
|
||
export const GlassPicker: Component<{ | ||
glass: string; | ||
setGlass: (glass: string) => void; | ||
}> = (props) => { | ||
return ( | ||
<div | ||
class="modal" | ||
onclick={(e) => { | ||
if (e.target.classList.contains("modal")) history.back(); | ||
}} | ||
> | ||
<div class="contents"> | ||
<div class="header"> | ||
<h2>Glass Picker</h2> | ||
</div> | ||
<div class="body"> | ||
<div class="row gap wrap"> | ||
<For each={names}> | ||
{(glass) => ( | ||
<div | ||
class="item col" | ||
style="width: 108px" | ||
onclick={(e) => props.setGlass(glass)} | ||
> | ||
<div style="text-align: center;"> | ||
{glass.charAt(0).toUpperCase() + glass.slice(1)} | ||
</div> | ||
<svg | ||
class="glass" | ||
width="160px" | ||
height="160px" | ||
style="margin: 0 -26px" | ||
> | ||
<use href={glasses[glass] + "#img"} /> | ||
</svg> | ||
</div> | ||
)} | ||
</For> | ||
</div> | ||
</div> | ||
<div class="footer"> | ||
<div class="buttons"> | ||
<button class="warn" onclick={() => history.back()}> | ||
Cancel | ||
</button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; |
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
Oops, something went wrong.