npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-native-wrapped-text

v1.2.2

Published

react native word wrap text component for support korean

Downloads

234

Readme

react-native-wrapped-text

react native word wrap text component for support korean

Motivation

iOS 에서는 한글 어절 단위의 개행을 지원하지 않습니다. 이를 React Native 에서 해결하기 위한 컴포넌트입니다. 아래의 스크린샷과 Example Code 를 확인하세요!

img

Installation

npm install react-native-wrapped-text
yarn add react-native-wrapped-text

Usage

import WrappedText from "react-native-wrapped-text";

<WrappedText>
    어절(단어) 단위로 개행이 되기를 원하는 한글 텍스트를 입력하세요
</WrappedText>;

Change Logs

1.2.0

  • Support Custom Text Component as a prop

Support Props

| Prop | Type | Default | Description | | :--------------- | :-------- | :------ | ------------------------- | | debug? | boolean | - | debugging mode | | containerStyle? | ViewStyle | - | component container style | | rowWrapperStyle? | ViewStyle | - | row text wrapper style | | textStyle? | TextStyle | - | text style | | TextComponent? | Component | - | custom text component |

Example

import React from "react";
import { SafeAreaView, View, Text } from "react-native";
import WrappedText from "react-native-wrapped-text";

const text =
    "나의 별들을 이 마디씩 별 이웃 무엇인지 듯합니다. 슬퍼하는 애기 노새, 이네들은 동경과 당신은 하나 거외다. 아직 소녀들의 가득 이름자 하나에 북간도에 별들을 같이 듯합니다. 못 나의 위에도 듯합니다. 내린 프랑시스 잠, 사람들의 라이너 하나에 이런 쓸쓸함과 있습니다. 이름과 벌레는 풀이 별 마리아 잔디가 거외다. 토끼, 내린 하나 다하지 없이 나는 봅니다.";

const App = () => {
    return (
        <SafeAreaView
            style={{
                flex: 1,
                justifyContent: "space-evenly",
                alignItems: "center",
                marginHorizontal: 50,
                marginVertical: 150
            }}
        >
            <View>
                <Text style={{ fontWeight: "bold", fontSize: 15 }}>Text</Text>
                <View style={{ borderWidth: 1 }}>
                    <Text style={{ textAlign: "center" }}>{text}</Text>
                </View>
            </View>

            <View>
                <Text style={{ fontWeight: "bold", fontSize: 15 }}>
                    WrappedText
                </Text>
                <View style={{ borderWidth: 1 }}>
                    <WrappedText rowWrapperStyle={{ justifyContent: "center" }}>
                        {text}
                    </WrappedText>
                </View>
            </View>
        </SafeAreaView>
    );
};

export default App;