File tree 2 files changed +17
-9
lines changed
2 files changed +17
-9
lines changed Original file line number Diff line number Diff line change 50
50
################ Set up light layout ################
51
51
controls = html .Div ([
52
52
Joystick (
53
- id = 'demojoystick'
53
+ id = 'demojoystick' ,
54
+ label = 'Joystick' ,
54
55
),
55
56
Knob (
56
57
id = 'demoKnob' ,
239
240
240
241
################ Set up dark layout ################
241
242
dark_controls = html .Div ([
243
+ Joystick (
244
+ id = 'dark-demojoystick' ,
245
+ label = 'Joystick' ,
246
+ ),
242
247
Knob (
243
248
id = 'dark-demoKnob' ,
244
249
label = 'Knob' ,
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
3
3
import { withTheme } from 'styled-components' ;
4
4
import joystick from 'nipplejs' ;
5
5
import { light } from '../styled/constants' ;
6
+ import LabelContainer from '../styled/shared/LabelContainer.styled' ;
6
7
7
8
/**
8
9
* A joystick.
@@ -51,14 +52,16 @@ class Joystick extends Component {
51
52
52
53
return (
53
54
< div id = { id } className = { className } style = { style } >
54
- < div
55
- ref = { ref => ( this . zoneRef = ref ) }
56
- style = { {
57
- position : 'relative' ,
58
- width : size + 'px' ,
59
- height : size + 'px'
60
- } }
61
- />
55
+ < LabelContainer { ...this . props } >
56
+ < div
57
+ ref = { ref => ( this . zoneRef = ref ) }
58
+ style = { {
59
+ position : 'relative' ,
60
+ width : size + 'px' ,
61
+ height : size + 'px'
62
+ } }
63
+ />
64
+ </ LabelContainer >
62
65
</ div >
63
66
) ;
64
67
}
You can’t perform that action at this time.
0 commit comments