@primer/react-brand
Version:
Primer Brand is a GitHub's design system for creating React-based marketing websites and digital experiences.
46 lines (45 loc) • 1.44 kB
TypeScript
import React from 'react';
import type { BaseProps } from '../../component-helpers';
import type { FormInputSizes, FormValidationStatus } from '../form-types';
export type SelectProps = {
/**
* Applies full width styling.
*/
fullWidth?: boolean;
/**
* Applies a required attribute to the input
*/
required?: boolean;
/**
* Applies alternative sizing to the input
*/
size?: FormInputSizes;
/**
* Placeholder text to display when no value is selected
*/
placeholder?: string;
/**
*
*/
validationStatus?: FormValidationStatus;
} & Omit<React.InputHTMLAttributes<HTMLSelectElement>, 'size'> & BaseProps<HTMLSelectElement>;
export type OptionProps = {
value: string;
} & React.PropsWithChildren<React.HTMLProps<HTMLOptionElement>>;
export type OptGroupProps = {
/**
* Specifies that an option-group should be disabled
*/
disabled?: string;
/**
* Specifies a label for an option-group
*/
label: string;
} & React.PropsWithChildren<React.HTMLProps<HTMLOptGroupElement>>;
/**
* Select
*/
export declare const Select: React.ForwardRefExoticComponent<Omit<SelectProps, "ref"> & React.RefAttributes<unknown>> & {
Option: ({ children, value, ...rest }: OptionProps) => import("react/jsx-runtime").JSX.Element;
OptGroup: ({ children, label, ...rest }: OptGroupProps) => import("react/jsx-runtime").JSX.Element;
};