index.sjs 260 B

1234567891011121314151617
  1. const 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
  15. }