-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
24 changed files
with
528 additions
and
284 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,44 @@ | ||
.activator { | ||
display: block; | ||
border-radius: 8px; | ||
border: 1px solid transparent; | ||
padding: 0.5em 1em; | ||
font-size: 0.9em; | ||
font-weight: 500; | ||
font-family: inherit; | ||
color: #efefef; | ||
background-color: #1e1e1e; | ||
cursor: pointer; | ||
transition: border-color 0.25s; | ||
} | ||
|
||
.activator:hover { | ||
border-color: #ffed24; | ||
} | ||
|
||
.activator:focus, | ||
.activator:focus-visible { | ||
outline: 4px auto -webkit-focus-ring-color; | ||
} | ||
|
||
.background { | ||
position: fixed; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 100%; | ||
border: 0; | ||
background-color: #090909; | ||
color: #efefef; | ||
font-size: 1.5rem; | ||
opacity: 0.8; | ||
z-index: 1; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
} | ||
|
||
.background:focus, | ||
.background:focus-visible { | ||
border: 4px solid #ffed24; | ||
} |
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,67 @@ | ||
<script> | ||
/** @type {string} */ | ||
export let content | ||
let open = false | ||
</script> | ||
|
||
<button | ||
class="activator" | ||
aria-haspopup="dialog" | ||
on:click={() => (open = !open)} | ||
> | ||
<slot /> | ||
</button> | ||
|
||
{#if open} | ||
<button class="background" on:click={() => (open = false)}> | ||
<p>{content}</p> | ||
</button> | ||
{/if} | ||
|
||
<style> | ||
.activator { | ||
display: block; | ||
border-radius: 8px; | ||
border: 1px solid transparent; | ||
padding: 0.5em 1em; | ||
font-size: 0.9em; | ||
font-weight: 500; | ||
font-family: inherit; | ||
color: #efefef; | ||
background-color: #1e1e1e; | ||
cursor: pointer; | ||
transition: border-color 0.25s; | ||
} | ||
.activator:hover { | ||
border-color: #ffed24; | ||
} | ||
.activator:focus, | ||
.activator:focus-visible { | ||
outline: 4px auto -webkit-focus-ring-color; | ||
} | ||
.background { | ||
position: fixed; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 100%; | ||
border: 0; | ||
background-color: #090909; | ||
color: #efefef; | ||
font-size: 1.5rem; | ||
opacity: 0.8; | ||
z-index: 1; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
} | ||
.background:focus, | ||
.background:focus-visible { | ||
border: 4px solid #ffed24; | ||
} | ||
</style> |
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,69 @@ | ||
<script setup> | ||
import { ref } from 'vue' | ||
defineProps({ | ||
content: { | ||
type: String, | ||
required: true | ||
} | ||
}) | ||
const open = ref(false) | ||
</script> | ||
|
||
<template> | ||
<button class="activator" aria-haspopup="dialog" @click="open = !open"> | ||
<slot /> | ||
</button> | ||
|
||
<button v-show="open" class="background" @click="open = false"> | ||
<p>{{ content }}</p> | ||
</button> | ||
</template> | ||
|
||
<style scoped> | ||
.activator { | ||
display: block; | ||
border-radius: 8px; | ||
border: 1px solid transparent; | ||
padding: 0.5em 1em; | ||
font-size: 0.9em; | ||
font-weight: 500; | ||
font-family: inherit; | ||
color: #efefef; | ||
background-color: #1e1e1e; | ||
cursor: pointer; | ||
transition: border-color 0.25s; | ||
} | ||
.activator:hover { | ||
border-color: #ffed24; | ||
} | ||
.activator:focus, | ||
.activator:focus-visible { | ||
outline: 4px auto -webkit-focus-ring-color; | ||
} | ||
.background { | ||
position: fixed; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 100%; | ||
border: 0; | ||
background-color: #090909; | ||
color: #efefef; | ||
font-size: 1.5rem; | ||
opacity: 0.8; | ||
z-index: 1; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
} | ||
.background:focus, | ||
.background:focus-visible { | ||
border: 4px solid #ffed24; | ||
} | ||
</style> |
Oops, something went wrong.