UNPKG

@awsui/components-react

Version:

On July 19th, 2022, we launched [Cloudscape Design System](https://cloudscape.design). Cloudscape is an evolution of AWS-UI. It consists of user interface guidelines, front-end components, design resources, and development tools for building intuitive, en

27 lines 999 B
import React from 'react'; import { ColumnWidthStyle } from './column-widths-utils'; export declare const DEFAULT_COLUMN_WIDTH = 120; export interface ColumnWidthDefinition extends ColumnWidthStyle { id: PropertyKey; } interface WidthsContext { getColumnStyles(sticky: boolean, columnId: PropertyKey): ColumnWidthStyle; columnWidths: Map<PropertyKey, number>; updateColumn: (columnId: PropertyKey, newWidth: number) => void; setCell: (sticky: boolean, columnId: PropertyKey, node: null | HTMLElement) => void; } declare const WidthsContext: React.Context<WidthsContext>; interface WidthProviderProps { visibleColumns: readonly ColumnWidthDefinition[]; resizableColumns: boolean | undefined; containerRef: React.RefObject<HTMLElement>; children: React.ReactNode; } export declare function ColumnWidthsProvider({ visibleColumns, resizableColumns, containerRef, children }: WidthProviderProps): JSX.Element; export declare function useColumnWidths(): WidthsContext; export {};