1.0.47 • Published 10 months ago

@mohsin-mi/iconpicker v1.0.47

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

Usage Example.

Note: This IconPicker uses Font Awesome 6.6.0.

Install IconPicker package

npm i @mohsin-mi/iconpicker

Import IconPicker and IconPicker.css

import IconPicker from "@mohsin-mi/iconpicker";
import '@mohsin-mi/iconpicker/lib/iconpicker.css';

Use the IconPicker component, and pass fontawesome icons as an object with whatever the category names you want.

    const icons = {
        Brands: [
            'fa-brands fa-500px',
            'fa-brands fa-amazon',
        ],
        Currency: [
        'fa-cny',
        'fa-dollar-sign',
        ],
    };

Alternatively, you can import some pre-defined Icons from the package.

    
    import icons from '@mohsin-mi/iconpicker/lib/icons.js';

    <IconPicker
    icons={icons}
    value={`fa-brands fa-amazon`}
    onChange={(e) => onChange(e, "icon")}
    closeOnSelect={true}
    showCategory={true}
    showSearch={true}
    isMulti={false}
    adjustPosition={{ top: 10, left: 0 }}
    buttonStyle={`flex items-center justify-center min-h-[35px] min-w-[35px] rounded-l-[8px] border border-none`}
    noSelectedPlaceholder={'arrow-up-from-bracket'}
    zIndexPopup={9999}
    popupStyle='bg-white border border-gray-300 shadow-lg rounded popup-container min-w-[280px]'
    gridColumns = {5}
    gridRows = {4}
    iconBgColor = {`bg-gray-200`}
    iconSelectedBgColor = {`bg-blue-200`}
    iconHeight = {65}
    iconWidth = {65}
    />
1.0.47

10 months ago

1.0.44

11 months ago

1.0.43

11 months ago

1.0.42

11 months ago

1.0.46

11 months ago

1.0.45

11 months ago

1.0.39

11 months ago

1.0.38

11 months ago

1.0.40

11 months ago

1.0.41

11 months ago

1.0.37

11 months ago

1.0.33

11 months ago

1.0.32

11 months ago

1.0.31

11 months ago

1.0.30

11 months ago

1.0.36

11 months ago

1.0.35

11 months ago

1.0.34

11 months ago

1.0.26

11 months ago

1.0.25

11 months ago

1.0.24

11 months ago

1.0.29

11 months ago

1.0.28

11 months ago

1.0.27

11 months ago

1.0.22

11 months ago

1.0.21

11 months ago

1.0.23

11 months ago

1.0.19

11 months ago

1.0.18

11 months ago

1.0.17

11 months ago

1.0.16

11 months ago

1.0.11

11 months ago

1.0.20

11 months ago

1.0.15

11 months ago

1.0.14

11 months ago

1.0.13

11 months ago

1.0.12

11 months ago

1.0.10

11 months ago

1.0.9

11 months ago

1.0.8

11 months ago

1.0.7

11 months ago

1.0.6

11 months ago

1.0.5

11 months ago

1.0.4

11 months ago

1.0.3

11 months ago

1.0.2

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago