mirror of
https://github.com/10h30/astroplate.git
synced 2026-07-18 22:23:27 +09:00
update banner-img
This commit is contained in:
@@ -155,7 +155,7 @@ const Search = ({ searchList }: Props) => {
|
||||
{humanize(category)}
|
||||
{index !== item.data.categories.length - 1 && ", "}
|
||||
</a>
|
||||
)
|
||||
),
|
||||
)}
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -22,14 +22,14 @@ const Tabs = ({ children }: { children: React.ReactElement }) => {
|
||||
|
||||
const tabLinks = Array.from(
|
||||
children.props.value.matchAll(
|
||||
/<div\s+data-name="([^"]+)"[^>]*>(.*?)<\/div>/gs
|
||||
/<div\s+data-name="([^"]+)"[^>]*>(.*?)<\/div>/gs,
|
||||
),
|
||||
(match: RegExpMatchArray) => ({ name: match[1], children: match[0] })
|
||||
(match: RegExpMatchArray) => ({ name: match[1], children: match[0] }),
|
||||
);
|
||||
|
||||
const handleKeyDown = (
|
||||
event: React.KeyboardEvent<EventTarget>,
|
||||
index: number
|
||||
index: number,
|
||||
) => {
|
||||
if (event.key === "Enter" || event.key === " ") {
|
||||
setActive(index);
|
||||
@@ -57,7 +57,7 @@ const Tabs = ({ children }: { children: React.ReactElement }) => {
|
||||
>
|
||||
{item.name}
|
||||
</li>
|
||||
)
|
||||
),
|
||||
)}
|
||||
</ul>
|
||||
{tabLinks.map((item: { name: string; children: string }, i: number) => (
|
||||
|
||||
Reference in New Issue
Block a user