@carbon/ibm-products
Version:
Carbon for IBM Products
106 lines • 3.57 kB
TypeScript
/**
* Copyright IBM Corp. 2022, 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';
import { CarbonIconType } from '@carbon/icons-react/lib/CarbonIcon';
import { ActionIcon } from '../Card/Card';
type PlacementType = 'top' | 'bottom';
export interface EditUpdateCardsProps {
/**
* Icons that are displayed on the card. Refer to design documentation for implementation guidelines. Note: href is deprecated. Set link.href for href functionality. If you are setting link object, href is a required property. link object supports all anchor element properties. Precedence: link.href > href. If link.href or href is set => anchor element, else button.
*/
actionIcons?: Array<ActionIcon>;
/**
* Determines if the action icons are on the top or bottom of the card
*/
actionsPlacement?: PlacementType;
/**
* Optional label for the top of the card.
*/
className?: string;
/**
* Optional header description
*/
description?: string;
/**
* Edit mode children
*/
editChildren?: ReactNode;
/**
* Edit mode
*/
editMode?: boolean;
/**
* Optional label for the top of the card
*/
label?: string;
/**
* Function that's called from the primary button or action icon
*/
onPrimaryButtonClick?(): void;
/**
* Function that's called from the secondary button or action icon
*/
onSecondaryButtonClick?(): void;
/**
* Preview mode children
*/
previewChildren?: ReactNode;
/**
* Optional prop to allow overriding the icon rendering. Can be a React component class
*/
primaryButtonIcon?: CarbonIconType;
/**
* Establishes the kind of button displayed for the primary button
*/
primaryButtonKind?: 'primary' | 'ghost';
/**
* Determines if the primary button is on the top or bottom of the card
*/
primaryButtonPlacement?: PlacementType;
/**
* The text that's displayed in the primary button
*/
primaryButtonText?: string;
/**
* Optionally specify an href for your Button to become an <a> element
*/
secondaryButtonHref?: string;
/**
* Optional prop to allow overriding the icon rendering. Can be a React component class
*/
secondaryButtonIcon?: CarbonIconType;
/**
* Establishes the kind of button displayed for the secondary button
*/
secondaryButtonKind?: 'secondary' | 'ghost';
/**
* Determines if the secondary button is on the top or bottom of the card
*/
secondaryButtonPlacement?: PlacementType;
/**
* The text that's displayed in the secondary button
*/
secondaryButtonText?: string;
/**
* Title that's displayed at the top of the card
*/
title?: string;
/**
* Determines title size
*/
titleSize?: 'default' | 'large';
}
/**
* **This component is deprecated.** <br>
Editable cards allow a user to view, modify, and save the content contained within the card.
These cards are generally used in instances where a user needs to make changes to a resource instances
(ex. configuration details), account plan, etc. Editable cards allow a user to edit something within context.
@deprecated
*/
export declare const EditUpdateCards: React.ForwardRefExoticComponent<EditUpdateCardsProps & React.RefAttributes<HTMLDivElement>>;
export {};
//# sourceMappingURL=EditUpdateCards.d.ts.map