1.0.0 • Published 2 years ago
@typography-org/native v1.0.0
@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
1.0.0
2 years ago
1.0.0-rc.1
2 years ago
1.0.0-rc.0
2 years ago
1.0.0-beta.6
2 years ago
1.0.0-beta.5
2 years ago
1.0.0-beta.4
2 years ago
1.0.0-beta.3
2 years ago
1.0.0-beta.2
2 years ago
1.0.0-beta.1
2 years ago
1.0.0-beta
2 years ago
1.0.0-alpha
2 years ago