A modal dialog component based on Radix UI.
Key features:
- Customizable content, header, and footer
- Accessible design
- Animated transitions
Usage:
<Dialog>
<DialogContent>
<DialogHeader>
<DialogTitle>Title</DialogTitle>
</DialogHeader>
{/* Content */}
</DialogContent>
</Dialog>
A styled input component.
Usage:
<Input type="text" placeholder="Enter text" />
A versatile button component with various styles.
Usage:
<Button variant="outline" onClick={handleClick}>
Click me
</Button>
A customizable dropdown menu component.
Usage:
<DropdownMenu>
<DropdownMenuTrigger>Open</DropdownMenuTrigger>
<DropdownMenuContent>
<DropdownMenuItem>Item 1</DropdownMenuItem>
<DropdownMenuItem>Item 2</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
Displays an individual media item (image or video).
Usage:
<MediaCard item={mediaItem} type="image" />
Renders a grid of MediaCard components.
Usage:
<MediaGrid
mediaItems={items}
itemsPerRow={3}
openMediaViewer={handleOpen}
type="image"
/>
Provides a full-screen view of media items with navigation.
Usage:
<MediaView
initialIndex={0}
onClose={handleClose}
allMedia={mediaItems}
currentPage={1}
itemsPerPage={10}
type="image"
/>
Displays an individual album with cover image and actions.
Usage:
<AlbumCard
album={albumData}
onClick={handleClick}
onEdit={handleEdit}
onDelete={handleDelete}
/>
Renders a grid of AlbumCard components.
Usage:
<AlbumList
albums={albumsData}
albumsPerRow={3}
onAlbumClick={handleAlbumClick}
onEditAlbum={handleEdit}
onDeleteAlbum={handleDelete}
/>
Displays the contents of a single album.
Usage:
<AlbumView albumName="My Album" onBack={handleBack} onError={handleError} />
Displays a full-screen loading indicator.
Usage:
{
isLoading && <LoadingScreen />;
}
Displays error messages in a dialog.
Usage:
<ErrorDialog content={errorContent} onClose={handleClose} />
Provides pagination controls for lists or grids.
Usage:
<PaginationControls
currentPage={1}
totalPages={10}
onPageChange={handlePageChange}
/>
A form dialog for creating new albums.
Usage:
<CreateAlbumForm
isOpen={isOpen}
onClose={handleClose}
onSuccess={handleSuccess}
onError={handleError}
/>
A dialog for editing album details.
Usage:
<EditAlbumDialog
album={selectedAlbum}
onClose={handleClose}
onSuccess={handleSuccess}
onError={handleError}
/>
- Use TypeScript for improved type safety.
- Leverage Tailwind CSS for consistent styling.
- Implement proper error handling and loading states.
- Ensure accessibility in all components.
- Optimize performance with React hooks like useMemo and useCallback.
Most components accept a className
prop for additional styling. Modify the base styles in component files or use a global CSS file for overrides.
For more detailed information on specific components, refer to the individual component files or consult the development team.