Code refactor
parent
7aa7230082
commit
a699338e38
|
@ -84,8 +84,8 @@ const css = `
|
||||||
/* Direction */
|
/* Direction */
|
||||||
const inlineStyles = {
|
const inlineStyles = {
|
||||||
root: ({ props }) => ({
|
root: ({ props }) => ({
|
||||||
alignItems: props.direction === 'up' || props.direction === 'down' ? 'center' : '',
|
alignItems: (props.direction === 'up' || props.direction === 'down') && 'center',
|
||||||
justifyContent: props.direction === 'left' || props.direction === 'right' ? 'center' : '',
|
justifyContent: (props.direction === 'left' || props.direction === 'right') && 'center',
|
||||||
flexDirection: props.direction === 'up' ? 'column-reverse' : props.direction === 'down' ? 'column' : props.direction === 'left' ? 'row-reverse' : props.direction === 'right' ? 'row' : null
|
flexDirection: props.direction === 'up' ? 'column-reverse' : props.direction === 'down' ? 'column' : props.direction === 'left' ? 'row-reverse' : props.direction === 'right' ? 'row' : null
|
||||||
}),
|
}),
|
||||||
menu: ({ props }) => ({
|
menu: ({ props }) => ({
|
||||||
|
|
Loading…
Reference in New Issue