@heycar-uikit/core
Version:
The React UI library from HeyCar
40 lines (39 loc) • 1.19 kB
TypeScript
/// <reference types="react" />
import React from 'react';
interface ComponentProps {
/**
* The content of the button
*/
children: React.ReactNode;
/**
* Title of the accordion
*/
title: React.ReactNode;
/**
* If `true`, expands the accordion, otherwise collapse it.
* Setting this prop enables control over the accordion.
*/
open?: boolean;
/**
* If `true`, the component is disabled.
*/
disabled?: boolean;
/**
* The component used for the root node. Either a string to use a HTML element or a component
*/
Component?: React.ElementType;
/**
* The id for testing
*/
dataTestId?: string;
/**
* A function that's triggered when expanding/collapsing the accordion
*/
onExpandedChange?: (expanded: boolean) => void;
/**
* A function that's triggered once expanding/collapsing transition ends
*/
onTransitionEnd?: (expanded: boolean) => void;
}
declare const Accordion: React.ForwardRefExoticComponent<ComponentProps & Omit<React.AnchorHTMLAttributes<HTMLElement>, "title"> & React.RefAttributes<HTMLElement>>;
export { Accordion as default };