index.sjs 298 B

123456789101112131415
  1. var getLineWidthFlex = function getLineWidthFlex(textPosition, text) {
  2. if (!text) {
  3. return [1, 0];
  4. }
  5. if (textPosition === 'left') {
  6. return [1, 5];
  7. }
  8. if (textPosition === 'right') {
  9. return [5, 1];
  10. }
  11. return [1, 1];
  12. };
  13. export default {
  14. getLineWidthFlex: getLineWidthFlex
  15. };