@wandelbots/wandelbots-js-react-components
Version:
React UI toolkit for building applications on top of the Wandelbots platform
38 lines • 1.1 kB
TypeScript
import type { SxProps } from "@mui/material";
import { LogStore } from "./LogStore";
export type LogPanelProps = {
/** Log store instance to use, or create one automatically if not provided */
store?: LogStore;
/** Height of the component */
height?: string | number;
/** Additional styles */
sx?: SxProps;
/** Ref to the log store for external access */
onStoreReady?: (store: LogStore) => void;
};
/**
* A complete log panel component with built-in state management.
*
* @example
* ```tsx
* function MyComponent() {
* const [logStore, setLogStore] = useState<LogStore>()
*
* return (
* <LogPanel
* height={400}
* onStoreReady={setLogStore}
* />
* )
* }
*
* // Then use the store to add messages
* logStore?.addInfo("Operation completed successfully")
* logStore?.addError("Something went wrong")
* logStore?.addWarning("Warning message")
* ```
*/
export declare const LogPanel: ((props: LogPanelProps) => import("react/jsx-runtime").JSX.Element) & {
displayName: string;
};
//# sourceMappingURL=LogPanel.d.ts.map