Skip to content

Latest commit

 

History

History
45 lines (39 loc) · 976 Bytes

2.md

File metadata and controls

45 lines (39 loc) · 976 Bytes

Component prop text

Prop text usually use in component Dropdownlist, used to show the selected option, if the text is null the selected option is displayed on the items

Usage

import { Dropdownlist, EDropdownListArrowDirection, EDropdownlistDirection } from 'lvlgjs-ui'
import { useState } from 'react'

const items1 = [
    "Apple",
    "Banana",
    "Orange",
    "Cherry",
    "Grape",
    "Raspberry",
    "Melon",
    "Orange",
    "Lemon",
    "Nuts",
]

function Component () {
    const [value, setValue] = useState(false)
    return (
        <Dropdownlist
            style={style.dropdownlist}
            onChange={(e) => setValue(e.value)}
            items={items1}
            selectIndex={2}
            direction={EDropdownlistDirection.bottom}
            text={"Menu"}
            highlightSelect={false}
            arrow={EDropdownListArrowDirection.down}
        />
    )
}

const style = {
    dropdownlist: {},
}

Demo

test/checkbox