catreact
Version:
Catavolt Core React Components
75 lines (74 loc) • 2.11 kB
TypeScript
import { CvState, CvProps } from './catreact-core';
import { Prop, EntityRec, PaneContext, Binary } from 'catavolt-sdk';
export interface CvPropState extends CvState {
binary: Binary;
}
export interface CvPropProps extends CvProps {
/**
* className to apply to the property. wrapperElemProps will override this value
*/
className?: string;
/**
* style to apply to the property. wrapperElemProps will override this value
*/
style?: {};
handler?: (o: Prop) => {};
/**
* Function that allows for visibility control. Accepts sinlge param of sdk {Prop} object. Should return true
* if the component should be rendered, false if the component should be hidden.
*/
isVisible?: (o: Prop) => boolean;
/**
* The name of this property. The given (or enclosing) sdk {EnityRec} will be searched for the sdk {Prop} of this name
*/
propName: string;
/**
* Default to be used if this sdk {Prop} value is null or undefined
*/
defaultValue?: string;
/**
* The sdk {EntityRec} that owns this sdk {Prop}
*/
entityRec?: EntityRec;
/**
* The containing PaneContext
*/
paneContext?: PaneContext;
/**
* The wrapper element name for this prop value (should be html)
*/
wrapperElemName?: string;
/**
* The wrapper element props
*/
wrapperElemProps?: any;
/**
* Force the value of this prop to be the given value
*/
overrideValue?: string;
/**
* Currency symbol to use for 'money' types
*/
currencySymbol?: string;
/**
* Percentage symbol to use for percentage types
*/
percentageSymbol?: string;
/**
* The className to apply to 'bool' true values
*/
boolTrueClassName?: string;
/**
* The className to apply to 'bool' false values
*/
boolFalseClassName?: string;
/**
* The className to apply to image elements
*/
imageClassName?: string;
/**
* The style to apply to image elements
*/
imageStyle?: {};
}
export declare var CvProp: any;