@carbon/react
Version:
React components for the Carbon Design System
39 lines (38 loc) • 1.01 kB
TypeScript
/**
* Copyright IBM Corp. 2016, 2025
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
import React from 'react';
export type GridMode = 'flexbox' | 'css-grid';
export interface GridSettingContext {
/**
* The gutter mode for the GridContext
*/
mode: GridMode;
/**
* Specifies whether subgrid should be enabled
*/
subgrid?: boolean;
}
export interface GridSettingsProps {
/**
* Pass in components which will be rendered within the `GridSettings`
* component
*/
children?: React.ReactNode;
/**
* Specify the gutter mode for the GridContext
*/
mode: GridMode;
/**
* Specify whether subgrid should be enabled
*/
subgrid?: boolean;
}
export declare const GridSettings: React.FC<GridSettingsProps>;
/**
* Helper function for accessing the GridContext value
*/
export declare const useGridSettings: () => GridSettingContext;