Something went wrong. Try again.
React blog kit backed by AT Protocol. Provides filtering UI, pagination, Bluesky comments/embeds, subscribe widget, and markdown rendering.
Something went wrong. Try again.
752 B · 32 lines
TSX
at main
123456789101112131415161718192021222324252627282930313233"use client";
import { ArrowUpIcon, ArrowDownIcon } from "@heroicons/react/24/outline";import { Button } from "@/components/ui/button";
interface SortButtonProps { sortDateAsc: boolean; onSortToggle: () => void; className?: string;}
export default function SortButton({ sortDateAsc, onSortToggle, className }: SortButtonProps) { return ( <Button variant="outline" onClick={onSortToggle} className={`flex items-center gap-2${className ? ` ${className}` : ""}`} > {sortDateAsc ? ( <> <ArrowUpIcon className="h-4 w-4" /> Oldest First </> ) : ( <> <ArrowDownIcon className="h-4 w-4" /> Newest First </> )} </Button> );}