mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-06 10:02:43 +00:00
Remove switch statement
This commit is contained in:
@@ -3,13 +3,12 @@ const dedent = require('dedent-tabs').default;
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
edge : (side = 'bottom')=>{
|
edge : (side = 'bottom')=>{
|
||||||
let rotation;
|
const rotation = {
|
||||||
switch (side){
|
'bottom' : 0,
|
||||||
case 'bottom': rotation = 0; break;
|
'top' : 180,
|
||||||
case 'top' : rotation = 180; break;
|
'left' : 90,
|
||||||
case 'left' : rotation = 90; break;
|
'right' : 270
|
||||||
case 'right' : rotation = 270; break;
|
}[side];
|
||||||
}
|
|
||||||
return dedent`
|
return dedent`
|
||||||
{{imageMaskEdge${_.random(1, 8)},--offset:0cm,--rotation:${rotation};
|
{{imageMaskEdge${_.random(1, 8)},--offset:0cm,--rotation:${rotation};
|
||||||
{height:100%}
|
{height:100%}
|
||||||
|
|||||||
Reference in New Issue
Block a user