@kvaser/canking-api
Version:
CanKing API to communicate with the CanKing service using Node.js.
37 lines (36 loc) • 1.36 kB
TypeScript
/**
* This module includes a form row UI control, a container component that can be used to
* display form controls on one row.
*
* To be able to use these controls the CanKingDataProvider component must be present in the
* component tree above your component. Normally the CanKingDataProvider is added
* at the root of the component tree.
*
* @packageDocumentation
*/
import React from 'react';
export interface ColumnItem {
ref: React.Ref<HTMLDivElement>;
width?: number;
}
/**
* Gets a ColumnItem object that can be used in calls to useColumnItems and as props to ColumnItemControl.
* @returns A ColumnItem object
*/
export declare const useColumnItem: () => ColumnItem;
/**
* Calculate max width from all specified column items as soon as all items have widths values.
* @param columnItems All column items to set width for.
* @returns The max width, the width to use
*/
export declare const useColumnItems: (...columnItems: ColumnItem[]) => number;
export interface ColumnItemControlProps {
columnItem: ColumnItem;
width?: number;
children?: React.ReactNode;
}
/**
* A react component to be used when different components should share the same width.
*/
declare function ColumnItemControl({ columnItem, width, children }: ColumnItemControlProps): import("react/jsx-runtime").JSX.Element;
export default ColumnItemControl;