@typography-org/native
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

@typography-org/native

install

npm i @typography-org/native -S

fast use

normal example

import formatWithEllipsis from '@typography-org/native';
const width = 300;
const rows = 2;
const formatedText = formatWithEllipsis(props.children, {
  length: width * rows,
  lines: rows,
  fontSize: 14,
  fontFamily: '-apple-system, BlinkMacSystemFont, Segoe UI, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Helvetica Neue, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol',
});

recognize break lines

import formatWithEllipsis from '@typography-org/native';
const width = 300;
const rows = 2;
const formatedText = formatWithEllipsis(props.children, {
  length: width * rows,
  lines: rows,
  fontSize: 14,
  fontFamily: '-apple-system, BlinkMacSystemFont, Segoe UI, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Helvetica Neue, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol',
}, {
  recognizeLineBreaks: true,
});

Documentation

See https://drdevelop.github.io/typography/native/index.html

Community

Vue and React Components

@typography-org/react @typography-org/vue

Package Sidebar

Install

npm i @typography-org/native

Weekly Downloads

8

Version

1.0.0

License

MIT

Unpacked Size

10.6 kB

Total Files

8

Last publish

Collaborators

  • drdevelop