import type { ValidComponent } from "solid-js"; import { type ElementOf, Polymorphic, type PolymorphicProps, } from "../polymorphic"; import { type MeterDataSet, useMeterContext } from "./meter-context"; export interface MeterTrackOptions {} export interface MeterTrackCommonProps {} export interface MeterTrackRenderProps extends MeterTrackCommonProps, MeterDataSet {} export type MeterTrackProps< T extends ValidComponent | HTMLElement = HTMLElement, > = MeterTrackOptions & Partial>>; /** * The component that visually represents the meter track. * Act as a container for `Meter.Fill`. */ export function MeterTrack( props: PolymorphicProps>, ) { const context = useMeterContext(); return ( as="div" {...context.dataset()} {...(props as MeterTrackProps)} /> ); }