File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 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'
44
55const Collapses = ( ) => {
66 const [ visible , setVisible ] = useState ( false )
7+ const [ visibleHorizontal , setVisibleHorizontal ] = useState ( false )
78 const [ visibleA , setVisibleA ] = useState ( false )
89 const [ visibleB , setVisibleB ] = useState ( false )
910
@@ -43,6 +44,36 @@ const Collapses = () => {
4344 </ CCardBody >
4445 </ CCard >
4546 </ 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 >
4677 < CCol xs = { 12 } >
4778 < CCard className = "mb-4" >
4879 < CCardHeader >
You can’t perform that action at this time.
0 commit comments