UNPKG

@fluentui/react-northstar

Version:
45 lines (44 loc) 2.28 kB
import { Accessibility, AccordionContentBehaviorProps } from '@fluentui/accessibility'; import * as PropTypes from 'prop-types'; import * as React from 'react'; import { UIComponentProps, ChildrenComponentProps, ContentComponentProps } from '../../utils'; import { ComponentEventHandler, FluentComponentStaticProps } from '../../types'; export interface AccordionContentProps extends UIComponentProps, ChildrenComponentProps, ContentComponentProps { /** * Accessibility behavior if overridden by the user. */ accessibility?: Accessibility<AccordionContentBehaviorProps>; /** Id of the title it belongs to. */ accordionTitleId?: string; /** Whether or not the content is visible. */ active?: boolean; /** * Called on click. * * @param event - React's original SyntheticEvent. * @param data - All props. */ onClick?: ComponentEventHandler<AccordionContentProps>; } export declare const accordionContentClassName = "ui-accordion__content"; export declare type AccordionContentStylesProps = Required<Pick<AccordionContentProps, 'active'>>; /** * An AccordionContent displays content hosted in an Accordion. */ export declare const AccordionContent: (<TExtendedElementType extends React.ElementType<any> = "div">(props: React.RefAttributes<HTMLDListElement> & Omit<import("@fluentui/react-bindings").PropsOfElement<TExtendedElementType>, "as" | keyof AccordionContentProps> & { as?: TExtendedElementType; } & AccordionContentProps) => JSX.Element) & { propTypes?: React.WeakValidationMap<AccordionContentProps> & { as: React.Requireable<string | ((props: any, context?: any) => any) | (new (props: any, context?: any) => any)>; }; contextTypes?: PropTypes.ValidationMap<any>; defaultProps?: Partial<AccordionContentProps & { as: "div"; }>; displayName?: string; readonly __PRIVATE_PROPS?: React.RefAttributes<HTMLDListElement> & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & { ref?: React.Ref<HTMLDivElement>; }, "as" | keyof AccordionContentProps> & { as?: "div"; } & AccordionContentProps; } & FluentComponentStaticProps<AccordionContentProps>;