1- /* eslint-disable react/jsx-props-no-spreading */
21import React , { Component , ReactElement } from 'react' ;
32import { Button , SocketedButton , Flex } from '@deephaven/components' ;
43
54import { dhTruck } from '@deephaven/icons' ;
6- import { sampleSectionIdAndClasses } from './utils ' ;
5+ import SampleSection from './SampleSection ' ;
76
87function noOp ( ) : void {
98 return undefined ;
@@ -17,10 +16,7 @@ class Buttons extends Component<Record<string, never>, ButtonsState> {
1716 return (
1817 < >
1918 < h5 > Button Kinds</ h5 >
20- < div
21- { ...sampleSectionIdAndClasses ( 'buttons-regular' ) }
22- style = { { padding : '1rem 0' } }
23- >
19+ < SampleSection name = "buttons-regular" style = { { padding : '1rem 0' } } >
2420 < Flex gap = "size-100" >
2521 < Button kind = "primary" onClick = { noOp } >
2622 Primary
@@ -44,7 +40,7 @@ class Buttons extends Component<Record<string, never>, ButtonsState> {
4440 Ghost
4541 </ Button >
4642 </ Flex >
47- </ div >
43+ </ SampleSection >
4844 </ >
4945 ) ;
5046 }
@@ -60,10 +56,7 @@ class Buttons extends Component<Record<string, never>, ButtonsState> {
6056 } ;
6157
6258 return (
63- < div
64- { ...sampleSectionIdAndClasses ( 'links' ) }
65- style = { { paddingTop : '1rem' } }
66- >
59+ < SampleSection name = "links" style = { { paddingTop : '1rem' } } >
6760 < h5 > Links</ h5 >
6861 < Flex gap = "1rem" >
6962 { Object . entries ( levelMap ) . map ( ( [ level , semantic ] ) => (
@@ -73,13 +66,13 @@ class Buttons extends Component<Record<string, never>, ButtonsState> {
7366 </ a >
7467 ) ) }
7568 </ Flex >
76- </ div >
69+ </ SampleSection >
7770 ) ;
7871 }
7972
8073 static renderSocketedButtons ( ) : ReactElement {
8174 return (
82- < div { ... sampleSectionIdAndClasses ( ' buttons-socketed' ) } >
75+ < SampleSection name = " buttons-socketed" >
8376 < h5 > Socketed Buttons (for linker)</ h5 >
8477 < SocketedButton
8578 style = { { marginBottom : '1rem' , marginRight : '1rem' } }
@@ -116,7 +109,7 @@ class Buttons extends Component<Record<string, never>, ButtonsState> {
116109 >
117110 Disabled
118111 </ SocketedButton >
119- </ div >
112+ </ SampleSection >
120113 ) ;
121114 }
122115
@@ -132,10 +125,7 @@ class Buttons extends Component<Record<string, never>, ButtonsState> {
132125 const { toggle } = this . state ;
133126
134127 return (
135- < div
136- { ...sampleSectionIdAndClasses ( 'buttons-inline' ) }
137- style = { { padding : '1rem 0' } }
138- >
128+ < SampleSection name = "buttons-inline" style = { { padding : '1rem 0' } } >
139129 < h5 > Inline Buttons</ h5 >
140130 Regular btn-inline:
141131 < Button
@@ -176,7 +166,7 @@ class Buttons extends Component<Record<string, never>, ButtonsState> {
176166 < Button kind = "ghost" icon = { dhTruck } onClick = { noOp } >
177167 Text Button
178168 </ Button >
179- </ div >
169+ </ SampleSection >
180170 ) ;
181171 }
182172
0 commit comments