UNPKG

@fluentui/react-northstar

Version:
39 lines (38 loc) 2.07 kB
import * as React from 'react'; import * as PropTypes from 'prop-types'; import { UIComponentProps, ContentComponentProps, ChildrenComponentProps, ColorComponentProps } from '../../utils'; import { Accessibility } from '@fluentui/accessibility'; import { ShorthandValue, FluentComponentStaticProps } from '../../types'; import { BoxProps } from '../Box/Box'; export interface SegmentProps extends UIComponentProps<SegmentProps>, ChildrenComponentProps, ColorComponentProps, ContentComponentProps<ShorthandValue<BoxProps>> { /** * Accessibility behavior if overridden by the user. */ accessibility?: Accessibility<never>; /** An segment can show it is currently unable to be interacted with. */ disabled?: boolean; /** A segment can have its colors inverted for contrast. */ inverted?: boolean; } export declare type SegmentStylesProps = Required<Pick<SegmentProps, 'color' | 'inverted' | 'disabled'>>; export declare const segmentClassName = "ui-segment"; /** * A Segment visually groups related content. */ export declare const Segment: (<TExtendedElementType extends React.ElementType<any> = "div">(props: React.RefAttributes<HTMLDivElement> & Omit<import("@fluentui/react-bindings").PropsOfElement<TExtendedElementType>, "as" | keyof SegmentProps> & { as?: TExtendedElementType; } & SegmentProps) => JSX.Element) & { propTypes?: React.WeakValidationMap<SegmentProps> & { as: React.Requireable<string | ((props: any, context?: any) => any) | (new (props: any, context?: any) => any)>; }; contextTypes?: PropTypes.ValidationMap<any>; defaultProps?: Partial<SegmentProps & { as: "div"; }>; displayName?: string; readonly __PRIVATE_PROPS?: React.RefAttributes<HTMLDivElement> & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & { ref?: React.Ref<HTMLDivElement>; }, "as" | keyof SegmentProps> & { as?: "div"; } & SegmentProps; } & FluentComponentStaticProps<SegmentProps>;