File tree 1 file changed +31
-0
lines changed
1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import { DocsCallout, DocsExample } from 'src/components'
4
4
5
5
const Collapses = ( ) => {
6
6
const [ visible , setVisible ] = useState ( false )
7
+ const [ visibleHorizontal , setVisibleHorizontal ] = useState ( false )
7
8
const [ visibleA , setVisibleA ] = useState ( false )
8
9
const [ visibleB , setVisibleB ] = useState ( false )
9
10
@@ -43,6 +44,36 @@ const Collapses = () => {
43
44
</ CCardBody >
44
45
</ CCard >
45
46
</ CCol >
47
+ < CCol xs = { 12 } >
48
+ < CCard className = "mb-4" >
49
+ < CCardHeader >
50
+ < strong > React Collapse</ strong > < small > Horizontal</ small >
51
+ </ CCardHeader >
52
+ < CCardBody >
53
+ < p className = "text-medium-emphasis small" > You can use a link or a button component.</ p >
54
+ < DocsExample href = "components/collapse#horizontal" >
55
+ < CButton
56
+ className = "mb-3"
57
+ onClick = { ( ) => setVisibleHorizontal ( ! visibleHorizontal ) }
58
+ aria-expanded = { visibleHorizontal }
59
+ aria-controls = "collapseWidthExample"
60
+ >
61
+ Button
62
+ </ CButton >
63
+ < div style = { { minHeight : '120px' } } >
64
+ < CCollapse id = "collapseWidthExample" horizontal visible = { visibleHorizontal } >
65
+ < CCard style = { { width : '300px' } } >
66
+ < CCardBody >
67
+ This is some placeholder content for a horizontal collapse. It's hidden by
68
+ default and shown when triggered.
69
+ </ CCardBody >
70
+ </ CCard >
71
+ </ CCollapse >
72
+ </ div >
73
+ </ DocsExample >
74
+ </ CCardBody >
75
+ </ CCard >
76
+ </ CCol >
46
77
< CCol xs = { 12 } >
47
78
< CCard className = "mb-4" >
48
79
< CCardHeader >
You can’t perform that action at this time.
0 commit comments