@carbon/ibm-products
Version:
Carbon for IBM Products
78 lines • 2.49 kB
TypeScript
/**
* Copyright IBM Corp. 2021, 2024
*
* 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, { ReactNode } from 'react';
export interface OptionsTileProps {
/**
* Provide content to render as expandable OptionsTile. If no children
* are present, the OptionsTile will render as its variant.
*/
children?: ReactNode;
/**
* Provide an optional class to be applied to the containing node.
*/
className?: string;
/**
* Whether the toggle is enabled or disabled. If nothing is passed,
* no toggle will be rendered.
*/
enabled?: boolean;
/**
* Whether the OptionsTile is in invalid validation state.
*/
invalid?: boolean;
/**
* Provide a text explaining why the OptionsTile is in invalid state.
*/
invalidText?: string;
/**
* Whether the OptionsTile is in locked validation state.
*/
locked?: boolean;
/**
* Provide a text explaining why the OptionsTile is in locked state.
*/
lockedText?: string;
/**
* A handler for managing the controlled state of open prop. If not passed the open prop will not be honored and an uncontrolled state will be used.
*/
onChange?: (value: boolean) => void;
/**
* Provide a function which will be called each time the user
* interacts with the toggle.
*/
onToggle?: (value: boolean) => void;
/**
* For controlled usage of the tile open state. This prop only works when an onChange prop is also passed, otherwise an uncontrolled state is used.
*/
open?: boolean;
/**
* Define the size of the OptionsTile.
*/
size?: 'lg' | 'xl';
/**
* Optionally provide a text summarizing the current state of the content.
*/
summary?: string;
/**
* Provide the title for this OptionsTile. Must not contain any interactive elements.
*/
title: ReactNode;
/**
* Optionally provide an id which should be used for the title.
*/
titleId?: string;
/**
* Whether the OptionsTile is in warning validation state.
*/
warn?: boolean;
/**
* Provide a text explaining why the OptionsTile is in warning state.
*/
warnText?: string;
}
export declare const OptionsTile: React.ForwardRefExoticComponent<OptionsTileProps & React.RefAttributes<HTMLDivElement>>;
//# sourceMappingURL=OptionsTile.d.ts.map