wix-style-react
Version:
wix-style-react
106 lines • 4.57 kB
TypeScript
export default CardGalleryItem;
declare class CardGalleryItem extends React.PureComponent<any, any, any> {
static displayName: string;
static propTypes: {
/** Accepts a <Badge/> or any other static indicator. Passed element will be displayed at the top left corner of a card. */
badge: PropTypes.Requireable<PropTypes.ReactNodeLike>;
/** Set card size. */
size: PropTypes.Requireable<string>;
/** Set card title. */
title: PropTypes.Requireable<PropTypes.ReactNodeLike>;
/** Set card subtitle. */
subtitle: PropTypes.Requireable<PropTypes.ReactNodeLike>;
/** Accepts any component to be rendered as a suffix of the card's footer */
suffix: PropTypes.Requireable<PropTypes.ReactNodeLike>;
/**
Show drag handle
*/
draggable: PropTypes.Requireable<boolean>;
/**
* Removes buttons when other element is dragging and this card is droppable
*/
droppable: PropTypes.Requireable<boolean>;
/**
Extra props to pass to the `<DragHandle />` element
*/
dragHandleProps: PropTypes.Requireable<object>;
/**
* Indicates the element is dragging
*/
dragging: PropTypes.Requireable<boolean>;
/**
Show disabled drag handle
*/
dragDisabled: PropTypes.Requireable<boolean>;
/** Specifies the tab order of the component. */
tabIndex: PropTypes.Requireable<number>;
/** Specifies background image URL. */
backgroundImageUrl: PropTypes.Requireable<string>;
/** Accepts any component to be rendered as a background image. */
backgroundImageNode: PropTypes.Requireable<PropTypes.ReactNodeLike>;
/** Defines properties for the primary action button. */
primaryActionProps: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
/** Label of primary action button */
label: PropTypes.Requireable<PropTypes.ReactNodeLike>;
/** On click handler of primary action button and of the whole card */
onClick: PropTypes.Requireable<(...args: any[]) => any>;
/** Disable the primary action button */
disabled: PropTypes.Requireable<boolean>;
/** Message to be displayed when primary action button is disabled */
disabledMessage: PropTypes.Requireable<string>;
}>>>;
/** Defines properties for the secondary action button. */
secondaryActionProps: PropTypes.Requireable<PropTypes.InferProps<{
/** Label of secondary action text button */
label: PropTypes.Requireable<PropTypes.ReactNodeLike>;
/** On click handler of secondary action text button */
onClick: PropTypes.Requireable<(...args: any[]) => any>;
}>>;
/** Defines a popover menu to be displayed on hover at the top right corner or a card. */
settingsMenu: PropTypes.Requireable<PropTypes.ReactNodeLike>;
/** Applies a data-hook HTML attribute that can be used in the tests. */
dataHook: PropTypes.Requireable<string>;
/**
* Recommended values:
* - Square - 1
* - Portrait - 3/4
* - Cinema - 16/9
* - Landscape - 4/3
* - Custom number (e.g. 1.5)
*/
aspectRatio: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
/** Sets placement of background image. */
imagePlacement: PropTypes.Requireable<string>;
/** Sets suffix behavior to appear only on card hover. */
showSuffixOnHover: PropTypes.Requireable<boolean>;
};
static defaultProps: {
aspectRatio: number;
primaryActionProps: {
onClick: () => void;
};
size: string;
imagePlacement: string;
showSuffixOnHover: boolean;
};
constructor(props: any);
constructor(props: any, context: any);
state: {
isHovered: boolean;
isFocused: boolean;
};
_onMouseEnter: () => void;
_onMouseLeave: () => void;
_onFocus: (e: any) => void;
_onBlur: () => void;
_hasFooter(): boolean;
_renderBadge(): React.JSX.Element;
_renderDragHandle(): React.JSX.Element;
_renderFooter(): React.JSX.Element;
_renderActions(): React.JSX.Element;
_renderSettingsMenu(): React.JSX.Element;
render(): React.JSX.Element;
}
import React from 'react';
import PropTypes from 'prop-types';
//# sourceMappingURL=CardGalleryItem.d.ts.map