@adactive/arc-keyboard 中文文档教程

发布于 3年前 浏览 5 项目主页 更新于 3年前

Keyboard component

图片

此处有实例

Getting started

    npm i --save @adactive/arc-keyboard

    yarn add @adactive/arc-keyboard
    import AdsumKeyboard from "@adactive/arc-keyboard"
     ...
    <AdsumKeyboard 
        isOpen=true 
        lang="en"
        currentValue="" 
        onKeyClicked={this.onKeyClicked}

    />

Props

type PropsType = {|
    +isOpen: boolean,
    +lang: 'en' | 'fr',
    +currentValue: string,
    +onKeyClicked: (string) => void,
    +keyboardCSS?: CSSStyleDeclaration,
    +keyboardLineCSS?: CSSStyleDeclaration,
    +buttonCSS?: CSSStyleDeclaration
|};


static defaultProps = {
    isOpen: false,
    lang: 'en',
    currentValue: '',
    onKeyClicked: null
}

isOpen -> 显示或隐藏键盘

lang -> 键盘语言

currentValue -> 将当前查询值从键盘应用程序传递到处理结果

onKeyClicked -> 返回到

keyboardCSS 的回调函数 -> 自定义整个组件的整体CSS

keyboardLineCSS -> 自定义键盘组件每一行的CSS

buttonCSS -> 自定义键盘上的每个按钮

Copy component inside your project src folder

Less only

`npx @adactive/arc-keyboard copy --less-only`

Full copy

`npx @adactive/arc-keyboard copy`

Keyboard component

image

Live examples here

Getting started

    npm i --save @adactive/arc-keyboard

OR

    yarn add @adactive/arc-keyboard
    import AdsumKeyboard from "@adactive/arc-keyboard"
     ...
    <AdsumKeyboard 
        isOpen=true 
        lang="en"
        currentValue="" 
        onKeyClicked={this.onKeyClicked}

    />

Props

type PropsType = {|
    +isOpen: boolean,
    +lang: 'en' | 'fr',
    +currentValue: string,
    +onKeyClicked: (string) => void,
    +keyboardCSS?: CSSStyleDeclaration,
    +keyboardLineCSS?: CSSStyleDeclaration,
    +buttonCSS?: CSSStyleDeclaration
|};


static defaultProps = {
    isOpen: false,
    lang: 'en',
    currentValue: '',
    onKeyClicked: null
}

isOpen -> To show or hide keyboard

lang -> Language of keyboard

currentValue -> To pass current query value from application for keyboard to process result

onKeyClicked -> A callback function to result back to the

keyboardCSS -> To customise the overall CSS for the entire component

keyboardLineCSS -> To customise the CSS for each line of the keyboard component

buttonCSS -> To customise each button on the keyboard

Copy component inside your project src folder

Less only

`npx @adactive/arc-keyboard copy --less-only`

Full copy

`npx @adactive/arc-keyboard copy`
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文