0

I am using react-native. However, when a long string is input, the line breaks are not consistent in the right screen.

like this

enter image description here

However, I would like the string to wrap consistently as in the image below.

enter image description here

this is my code how can i fix or add code??

    import React from 'react';
    import styled from 'styled-components/native';

    const Container = styled.View`
      background: lightskyblue;
      width: 100%;
      height: 100%;
    `;

    const PolicyContainer = styled.View`
      background: lightyellow;
    `;

    const Label = styled.Text`
      font-size: 13px;
    `;
    const Policy = () => {
      return (
        <Container>
          <PolicyContainer>
            <Label>
              {'<'}example{'>'}('https://example'이하 'example')은(는) 「개인정보
              보호법」 제30조에 따라 정보주체의 개인정보를 보호하고 이와 관련한
              고충을 신속하고 원활하게 처리할 수 있도록 하기 위하여 다음과 같이
              개인정보 처리방침을 수립·공개합니다.
            </Label>
          </PolicyContainer>
        </Container>
      );
    };

    export default Policy;

1 Answer 1

1

Try using text-align: justify; in the style of Label. I believe it will solve your problem.

const Label = styled.Text`
  font-size: 13px;
  text-align: justify;
`;
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.