0.4.3 • Published 4 years ago

kollia v0.4.3

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

Kollia

Deeply customizable UI Components for react.js applications.

installation

To install this library, you can run:

npm install kollia or yarn add kollia

Usage

Here's an example of basic usage:

    import React from 'react';
    import { DatePicker } from 'kollia';

    function MyApp() {
        return (
            <div>
                <DatePicker 
                    title="Avaibility" 
                    setItemLabelValue={() => "€ 500"} 
                    onSelect={value => console.log(value)} />
            </div>
        );
    }

Documentation

DatePicker

PropTypeDefaultDescription
titlestringn/aTitle of the component
lengendstring[]"Unavailable","Available"Lengends text
classNamestringn/aCustom class name(s) that will be added
onSelect(value: {startDate: Date, endDate: Date}) => voidn/a
setItemLabelValue(date: Date) => stringn/afunction called to add custom label to each date (we have to return the label as a string)
textColorstring#1A2B48Color of the text in the calendar
headerColorstring#5E6D77color of the header text (day's names)
enableColor{borderColor: string; color: string; textColor: string}{borderColor: #dadcdd; color: #5191FA; textColor: #fff}color config of the enabled dates
disableColor{borderColor: string; color: string; textColor: string}{borderColor: #dadcdd; color: #fff; textColor: #dadcdd}color config of the disabled dates
activeColorstring#FA5636color of the current date
hiddenColorstringn/aset color here to display date that are not in the current month
selectedColor{color: string; backgroundColor: string}{color: #fff; backgroundColor: #5191FA}colors config of the selected dates
outerBorderColorstring#dadcddborder color of the calendar
innerBorderColorstring#dadcddborder color of each date in the calendar
headerBorderColorstring#dadcddborder color of the header bar
innerBorderRadiusnumber5border radius of each date in the calendar
outerBorderRadiusnumber5border width of the calendar
innerBorderWidthnumber1border width of each date in the calendar
headerBorderWidthnumber1border width of the header bar
disabledDatesDate[]n/alist of date to enable or disable dependind of the value of the enableOnly props
enableOnlybooleanfalseif true enable only the date provided in disabledDates props. All other dates will be disabled

Carousel

Author

Djibril ISSOUFOU