0.0.1 • Published 4 months ago

@zym-com/text v0.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
4 months ago

Install

npm install @zym-com/text

or

yarn add @zym-com/text

Import

import Text from "@zym-com/text";
import "@zym-com/text/dist/style.css";

Usage

import Text from "@zym-com/text";
import "@zym-com/text/dist/style.css";

function App() {
  const options = {
    "configuration": {
        "colorSelect": "solidColor",
        "solidColor": "rgba(255,255,255,1)",
        "anamorphism": {
            "startVal": "rgba(255,68,68,1)",
            "endVal": "rgba(0,0,0,1)",
            "direction": 180
        },
        "textStyle": {
            "fontFamily": "Microsoft Yahei",
            "fontSize": 18,
            "fontWeight": "normal",
            "letterSpacing": 0,
            "lineHeight": 18,
            "fontStyle": "normal"
        },
        "levelalignment": "center",
        "verticalalignment": "center",
        "paragraphspacing": 0,
        "transparency": 1,
        "shadow": {
            "shadowOffsetX": 0,
            "shadowOffsetY": 0,
            "shadowBlur": 0,
            "shadowColor": "rgba(255,255,255,1)"
        },
        "textShadow": false
    },
    "base": {
        "width": 200,
        "height": 50
    },
    "dataSource": [
        {
            "value": "我是文本组件"
        }
    ],
bindCallbackParams:(evenName: string, data: Record<string, any>) => void;
  }
  return (
    <>
      <Text {...options} />
    </>
  );
}

export default App;