react-components
package @remirror/react-components
function GenIcon()
A higher order component which creates the Icon component.
Signature:
export declare function GenIcon(tree: IconTree[], viewBox?: string): IconType;
Parameters:
Parameter | Type | Description |
---|---|---|
tree | IconTree[] | |
viewBox | string | (Optional) |
Returns:
function MentionAtomPopupComponent()
This component renders the emoji suggestion dropdown for the user.
Signature:
export declare function MentionAtomPopupComponent<Data extends MentionAtomNodeAttributes = MentionAtomNodeAttributes>(props: MentionAtomPopupComponentProps<Data>): JSX.Element;
Parameters:
Parameter | Type | Description |
---|---|---|
props | MentionAtomPopupComponentProps<Data> |
Returns:
JSX.Element
function useTheme()
Get the theme from the context and convert it to a style object which can be attached to any element.
The theme provided is deeply merged with the parent theme.
Signature:
export declare function useTheme(props?: UseThemeProps): {
theme: RemirrorThemeType;
style: CSSProperties;
className?: string;
};
Parameters:
Parameter | Type | Description |
---|---|---|
props | UseThemeProps | (Optional) |
Returns:
{ theme: RemirrorThemeType; style: CSSProperties; className?: string; }
variable EmojiPopupComponent
This component renders the emoji suggestion dropdown for the user.
Signature:
EmojiPopupComponent: FC
variable FloatingWrapper
Signature:
FloatingWrapper: FC<PropsWithChildren<FloatingWrapperProps>>
variable Icon
Dynamic icons for the remirror codebase..
Signature:
Icon: (props: IconProps) => JSX.Element
variable IconBase
The base icon as an svg with the icon context available
Signature:
IconBase: (props: IconBaseProps) => JSX.Element
variable PositionerPortal
Render a component into the editors positioner widget using createPortal
from react-dom
.
Signature:
PositionerPortal: FC<PositionerComponentProps>
variable ThemeProvider
This the ThemeProvider
. Wrap your editor with it to customise the theming of content within your editor.
Please be aware that this wraps your component in an extra dom layer.
Signature:
ThemeProvider: (props: ThemeProviderProps) => ReactElement<ThemeProviderProps>
interface IconBaseProps
Signature:
export interface IconBaseProps extends SVGAttributes<SVGElement>
Extends: SVGAttributes<SVGElement>
(Some inherited members may not be shown because they are not represented in the documentation.)
property children
Signature:
children?: ReactNode;
property color
Signature:
color?: string;
property size
Signature:
size?: string | number;
property title
Signature:
title?: string;
interface IconProps
Signature:
export interface IconProps extends IconBaseProps
Extends: IconBaseProps
(Some inherited members may not be shown because they are not represented in the documentation.)
property children
Signature:
children?: ReactNode;
property color
Signature:
color?: string;
property name
The name of the core icon to use.
Signature:
name: Icons.CoreIcon;
property size
Signature:
size?: string | number;
property title
Signature:
title?: string;
interface PositionerComponentProps
Signature:
export interface PositionerComponentProps
property children
Signature:
children: ReactNode;
interface ThemeProviderProps
Signature:
export interface ThemeProviderProps extends UseThemeProps
Extends: UseThemeProps
property as
A custom component to use for the wrapper.
Signature:
as?: ElementType<{
style?: CSSProperties;
className?: string;
}>;
property children
Signature:
children: ReactNode;
property className
Any extra class names to add to the wrapper component.
Signature:
className?: string;
property theme
The theme to customise the look and feel of your remirror editor.
Signature:
theme?: RemirrorThemeType;
interface UseThemeProps
Signature:
export interface UseThemeProps
property className
Any extra class names to add to the wrapper component.
Signature:
className?: string;
property theme
The theme to customise the look and feel of your remirror editor.
Signature:
theme?: RemirrorThemeType;
type IconType
Signature:
export type IconType = (props: IconBaseProps) => JSX.Element;
References: IconBaseProps