-
Notifications
You must be signed in to change notification settings - Fork 63
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
1 parent
6030099
commit 6abede7
Showing
63 changed files
with
183 additions
and
414 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,7 +71,8 @@ | |
"jsx-quotes": [ | ||
"error", | ||
"prefer-double" | ||
] | ||
], | ||
"unicorn/prevent-abbreviations": "off" | ||
} | ||
} | ||
} |
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,45 @@ | ||
--- | ||
import {Icon} from 'astro-iconify'; | ||
export type OverflowItemProps = { | ||
title: string; | ||
url: string; | ||
}; | ||
export type OverflowMenuProps = { | ||
overflowItems?: readonly OverflowItemProps[]; | ||
}; | ||
const {overflowItems} = Astro.props; | ||
--- | ||
|
||
<div class="relative flex items-center" style="padding-top:2px"> | ||
<select | ||
aria-label="Overflow menu" | ||
class="overflow-menu-component absolute inset-0 w-full h-full opacity-0 cursor-pointer" | ||
style="font-weight: initial; font-family: system-ui;" | ||
> | ||
<option value="" disabled selected>…</option> | ||
{overflowItems?.map(item => ( | ||
<option value={item.url}>{item.title}</option> | ||
))} | ||
<slot /> | ||
</select> | ||
<Icon | ||
name="tabler:dots-circle-horizontal" | ||
class="w-5 h-5 text-primary-600 dark:text-primary-400 pointer-events-none" | ||
aria-hidden="true" | ||
/> | ||
</div> | ||
|
||
<script is:inline> | ||
document.addEventListener('change', event => { | ||
if (event.target?.matches('.overflow-menu-component')) { | ||
const selectedValue = event.target.value; | ||
if (selectedValue) { | ||
event.target.value = ''; // Clear selection | ||
window.location.href = selectedValue; | ||
} | ||
} | ||
}); | ||
</script> |
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
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
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.