importimport Collapse from "@lib/component/Collapse";
Examples
Collapse Title
Basic
Cách sử dụng collapse cơ bản
Props
Property
Description
Type
Default
defaultActive
Trạng thái ban đầu của Collapse mở hoặc đóng hoặc cũng có thể sử dụng để mở rộng thu hẹp ở bên ngoài mà không cần sử Collapse.Title
boolean
-
expandAnimationDuration
Thời gian mở rộng
number
0.2
collapseAnimationDuration
Thời gian thu hẹp
number
0.2
onExpandEnd
function chạy sau khi quá trình mở rộng hoàn thành
function()
-
onCollapseEnd
function chạy sau khi quá trình thu hẹp hoàn thành
function()
-
lazyload
Component content chỉ được mount khi mở rộng
boolean
-
unmountOnCollapse
Component content sẽ bị unmout khi thu hẹp
boolean
-
Collapse.Title
Thành phần title của Collapse
Property
Description
Type
Default
className
className Collapse Title
string
-
children
Có thể truyền vào ReactNode hoặc một function return ra ReactNode.
Nếu là một function sẽ nhận đc tham số là isActive cho biết trạng thái mở rộng thu hẹp của content