how can i write JavaScript Ternary condition saying: if this & that do X ?
I tried ${(!props.direction && props.justify) && "justify-content: " + props.justify + ";"}; but doesn't seem to work..
Hard to tell the context from the question but guessing this is inside a style tag, if so, I think this should be correct:
${(!props.direction && props.justify) ? `justify-content: ${props.justify};` : ''};
i.e.
${myCondition ? 'truthy content' : 'falsey content'}