@fluentui/react-northstar
Version:
A themable React component library.
47 lines (46 loc) • 2.23 kB
TypeScript
import * as React from 'react';
import { UIComponentProps, ChildrenComponentProps, ContentComponentProps } from '../../utils';
import { Accessibility } from '@fluentui/accessibility';
import { ShorthandValue, FluentComponentStaticProps } from '../../types';
import { BoxProps } from '../Box/Box';
import { ReactionGroup } from './ReactionGroup';
export interface ReactionSlotClassNames {
icon: string;
content: string;
}
export interface ReactionProps extends UIComponentProps<ReactionProps>, ChildrenComponentProps, ContentComponentProps<ShorthandValue<BoxProps>> {
/**
* Accessibility behavior if overridden by the user.
*/
accessibility?: Accessibility<never>;
/** A reaction can have icon for the indicator of the reaction. */
icon?: ShorthandValue<BoxProps>;
}
export declare type ReactionStylesProps = {
hasContent: boolean;
};
export declare const reactionClassName = "ui-reaction";
export declare const reactionSlotClassNames: ReactionSlotClassNames;
/**
* A Reaction indicates user's emotion or perception.
* Used to display user's reaction for entity in Chat (e.g. message).
*/
export declare const Reaction: (<TExtendedElementType extends React.ElementType<any> = "span">(props: React.RefAttributes<HTMLSpanElement> & Omit<import("@fluentui/react-bindings").PropsOfElement<TExtendedElementType>, "as" | keyof ReactionProps> & {
as?: TExtendedElementType;
} & ReactionProps) => JSX.Element) & {
propTypes?: React.WeakValidationMap<ReactionProps> & {
as: React.Requireable<string | ((props: any, context?: any) => any) | (new (props: any, context?: any) => any)>;
};
contextTypes?: import("prop-types").ValidationMap<any>;
defaultProps?: Partial<ReactionProps & {
as: "span";
}>;
displayName?: string;
readonly __PRIVATE_PROPS?: React.RefAttributes<HTMLSpanElement> & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | keyof React.HTMLAttributes<HTMLSpanElement>> & {
ref?: React.Ref<HTMLSpanElement>;
}, "as" | keyof ReactionProps> & {
as?: "span";
} & ReactionProps;
} & FluentComponentStaticProps<ReactionProps> & {
Group: typeof ReactionGroup;
};