Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ACS
Public
VILLASframework
VILLASweb
Commits
eb2cc000
Commit
eb2cc000
authored
Nov 23, 2018
by
Steffen Vogel
🎅🏼
Browse files
widgets: make buttons fill the full widget dimensions
parent
6e6c5b89
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/components/widgets/button.js
View file @
eb2cc000
...
...
@@ -58,7 +58,7 @@ class WidgetButton extends Component {
render
()
{
return
(
<
div
className
=
"
button-widget full
"
>
<
Button
active
=
{
this
.
state
.
pressed
}
disabled
=
{
this
.
props
.
editing
}
onMouseDown
=
{
(
e
)
=>
this
.
onPress
(
e
)
}
onMouseUp
=
{
(
e
)
=>
this
.
onRelease
(
e
)
}
>
{
this
.
props
.
widget
.
name
}
<
/Button
>
<
Button
className
=
"
full
"
active
=
{
this
.
state
.
pressed
}
disabled
=
{
this
.
props
.
editing
}
onMouseDown
=
{
(
e
)
=>
this
.
onPress
(
e
)
}
onMouseUp
=
{
(
e
)
=>
this
.
onRelease
(
e
)
}
>
{
this
.
props
.
widget
.
name
}
<
/Button
>
<
/div
>
);
}
...
...
src/components/widgets/custom-action.js
View file @
eb2cc000
...
...
@@ -60,9 +60,11 @@ class WidgetCustomAction extends Component {
}
render
()
{
const
btnStyle
=
{
width
:
'
100%
'
,
height
:
'
100%
'
};
return
<
Button
disabled
=
{
this
.
state
.
simulator
===
null
}
style
=
{
btnStyle
}
onClick
=
{(
e
)
=>
this
.
onClick
()}
><
Icon
icon
=
{
this
.
props
.
widget
.
icon
}
/> <span dangerouslySetInnerHTML={{ __html: this.props.widget.name }} /
><
/Button>
;
return
<
div
className
=
"
widget-custom-action full
"
>
<
Button
className
=
"
full
"
disabled
=
{
this
.
state
.
simulator
===
null
}
onClick
=
{(
e
)
=>
this
.
onClick
()}
>
<
Icon
icon
=
{
this
.
props
.
widget
.
icon
}
/> <span dangerouslySetInnerHTML={{ __html: this.props.widget.name }} /
>
<
/Button
>
<
/div>
;
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment