UNPKG

react-winplaza-98

Version:

React components with a Win98 a e s t h e c t i c

37 lines (36 loc) 1.1 kB
import React from 'react'; /** * Props for the Dropdown component. */ interface DropdownProps extends React.ComponentProps<'select'> { /** * The name attribute for the select element. */ name: string; /** * An optional label for the dropdown. */ label?: string; } /** * A Win98 themed dropdown/select React component. * * This component extends the native HTML `select` element with additional props. * * @remarks * This component can be used to create a dropdown/select input with custom styling * and behavior by extending the native `select` element. It works seamlessly with * the `<option />` element to provide options. * * @example Creating a dropdown with options * * ```tsx * <Dropdown name="example" label="Select an option"> * <option value="option1">Option 1</option> * <option value="option2">Option 2</option> * <option value="option3">Option 3</option> * </Dropdown> * ``` */ declare const Dropdown: React.ForwardRefExoticComponent<Omit<DropdownProps, "ref"> & React.RefAttributes<HTMLSelectElement>>; export default Dropdown;