carbon-react
Version:
A library of reusable React components for easily building user interfaces.
31 lines (30 loc) • 1.3 kB
TypeScript
import React from "react";
import { MarginProps } from "styled-system";
import { TagProps } from "../../__internal__/utils/helpers/tags";
export interface NoteProps extends MarginProps, TagProps {
/** The aria-label to be used when no title is present */
"aria-label"?: string;
/** Adds a created on date to the Note footer */
createdDate: string;
/** renders a control for the Note */
inlineControl?: React.ReactNode;
/** Adds a name to the Note footer */
name?: string;
/** The rich text content to display in the Note */
noteContent: string;
/** Callback to report a url when a link is added */
onLinkAdded?: (url: string) => void;
/** The previews to display of any links added to the Editor */
previews?: React.ReactNode;
/** Adds a status and tooltip to the Note footer */
status?: {
text: string;
timeStamp: string;
};
/** Adds a Title to the Note */
title?: React.ReactNode;
/** Set a percentage-based width for the whole Note component, relative to its parent. */
width?: number;
}
export declare const Note: ({ "aria-label": ariaLabel, createdDate, inlineControl, name, noteContent, onLinkAdded, previews, status, title, width, ...rest }: NoteProps) => React.JSX.Element;
export default Note;