Repository URL to install this package:
|
Version:
2.8.0-studio-release ▾
|
import { ReactNode } from 'react'
import { EventHandlerArg } from 'typings/generic'
export type AccordionEventHandlerArgs = EventHandlerArg<
AccordionBlockProps,
AccordionBlockState
>
export interface AccordionOnToggle extends Function {
(args: AccordionEventHandlerArgs): void
}
// export interface EventHandler {
// (event: Event): void
// }
export interface AccordionRenderProp extends Function {
(props: AccordionBlockProps, state: AccordionBlockState): any
}
export interface StandardProps {
children?: ReactNode
className?: string
}
export interface AccordionTitleProps extends StandardProps {
title: string | any
state?: AccordionBlockState
text?: string | any
activeText?: string | any
defaultIcon?: any
isActive?: boolean
isDisabled?: boolean
onToggle?: AccordionOnToggle
qa?: string
shouldShowArrowIcon?: boolean
// @deprecated
isPlusMinus?: boolean
}
export interface AccordionBlockProps extends StandardProps {
state?: AccordionBlockState
title: any
activeTitle?: any
qa?: string
isVisible?: boolean
isDisabled?: boolean
isDefaultVisible?: boolean
isPlusMinus?: boolean
shouldShowArrowIcon?: boolean
defaultView?: any
id?: string
/**
* @invalid - naming for event ExtensionPoints are ON
*/
// handleToggle?: any,
// not required now with the state
onToggle?: AccordionOnToggle
// isFindInStore?: bool,
render?: AccordionRenderProp
}
// @todo
export interface AccordionBlockState {
isVisible: boolean
}