-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Nested headings for Transcript Page (#75)
* fix(nested-headings): nested headings for content grouping components * refactor(data-structure): changed complex data structure for contentGrouping and Transcript content page
- Loading branch information
Showing
19 changed files
with
423 additions
and
384 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
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 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,41 @@ | ||
import { ExploreGroupedData } from "@/utils"; | ||
import Link from "next/link"; | ||
import React from "react"; | ||
import { twMerge } from "tailwind-merge"; | ||
|
||
export interface IAlphabetNavigation { | ||
currentGroup: string; | ||
groupedData: ExploreGroupedData[]; | ||
} | ||
const AlphabetNavigation = ({ currentGroup, groupedData }: IAlphabetNavigation) => { | ||
|
||
return ( | ||
<div | ||
className={ | ||
"grid grid-cols-5 p-5 gap-4 lg:p-6 2xl:gap-6 border border-gray-custom-1200 rounded-md" | ||
} | ||
> | ||
{groupedData.map((char) => | ||
char?.nested&& char?.nested.length > 0 ? ( | ||
<Link | ||
key={char.slug} | ||
href={`#${char.slug}`} | ||
className={twMerge("flex justify-center items-center w-8 h-8 text-base 2xl:h-10 2xl:w-10 2xl:text-lg", | ||
currentGroup === char.slug | ||
? "text-orange-custom-100 bg-orange-custom-900 rounded-[4px] font-semibold" | ||
: "hover:text-orange-custom-100", | ||
)} | ||
> | ||
{char.name} | ||
</Link> | ||
) : ( | ||
<button key={char.slug} className="text-gray-custom-1400 cursor-not-allowed"> | ||
{char.name} | ||
</button> | ||
) | ||
)} | ||
</div> | ||
); | ||
}; | ||
|
||
export default AlphabetNavigation; |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.