tharikida-ui
Version:
A modern, lightweight React UI component library with built-in theming, accessibility, and full TypeScript support. Create beautiful, responsive, and customizable web apps faster with ready-to-use components for any project.
44 lines (43 loc) • 1.93 kB
TypeScript
/**
* `MusicCard` is a visual card component to display music information such as name, artist, album image, and playback controls.
*
* @param {object} props - The properties to customize the `MusicCard` component.
* @param {string} [props.musicName] - The name of the music track.
* @param {string} [props.artist] - The name of the artist.
* @param {() => void} [props.onPlay] - Callback function triggered when play button is clicked.
* @param {string} [props.musicUrl] - The URL of the music track.
* @param {string} [props.image] - The URL of the image associated with the music track.
* @param {number} [props.currentPosition] - The current playback position as a percentage (0-100).
*
* @returns {JSX.Element} A styled React component that renders the music card.
*/
interface MusicCardProps {
/** The name of the music track. */
musicName?: string;
/** The name of the artist. */
artist?: string;
/** Callback function triggered when play button is clicked. */
onPlay?: () => void;
/** The URL of the music track. */
musicUrl?: string;
/** The URL of the image associated with the music track. */
image?: string;
/** The current playback position as a percentage (0-100). */
currentPosition?: number;
}
/**
* MusicCard Component
*
* A visual card component to display music information such as name, artist, album image,
* and playback controls.
*
* @param musicName - The name of the music track.
* @param artist - The name of the artist.
* @param musicUrl - The URL of the music track.
* @param image - The URL of the album image.
* @param currentPosition - The current playback position as a percentage.
*
* @returns A styled React component that renders the music card.
*/
declare const MusicCard: ({ musicName, artist, musicUrl, image, currentPosition, }: MusicCardProps) => import("react/jsx-runtime").JSX.Element;
export default MusicCard;