15 lines
298 B
JavaScript
15 lines
298 B
JavaScript
var getLineWidthFlex = function getLineWidthFlex(textPosition, text) {
|
|
if (!text) {
|
|
return [1, 0];
|
|
}
|
|
if (textPosition === 'left') {
|
|
return [1, 5];
|
|
}
|
|
if (textPosition === 'right') {
|
|
return [5, 1];
|
|
}
|
|
return [1, 1];
|
|
};
|
|
export default {
|
|
getLineWidthFlex: getLineWidthFlex
|
|
}; |