0.0.9 • Published 2 years ago

react-two-input-ranger v0.0.9

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

A Simple Two Input Material UI Range Component

This package takes advantage of the React MaterialUI framework v5.2.8 for components.

Example Implementation

<Ranger
    startInputProps={{error: false}}
    endInputProps={{error: false}}
    errorMessage="This is an error"
    startPlaceholder="Start"
    endPlaceholder="End"
    separatorValueVariant="subtitle1"
    separatorValue="-"
    onStartChanged={(ev) => {
        console.log('start changed'); console.log(ev)}
    }
    onEndChanged={(ev) => {
        console.log('end changed'); console.log(ev)}
    }
    numbersOnly={true}
/>

CSS Override classes

Parent ClassnameChild ClassnameDescription
main
maincontainerThe main container that holds all other elements
controlsContainerThe container that holds all of the inputs
errorMessage
errorMessagecontainerthe container DIV that holds the error message component
errorMessagetextthe actual error message text displayed
startcontainerthe container that holds the Start input control
startinputthe actual Start input control
endcontainerthe container that holds the End input control
endinputthe actual End input control
separatorcontainerthe container that holds the Separator component
separatortypographythe separator text that is displayed

Default Styles

{
    main: {
        container: {
            display: 'flex',
            flexDirection: 'column'
        }
    },
    controlsContainer: {
        padding: 20,
        flex: 1,
        textAlign: 'center'
    },
    errorMessage:{
        container:{
            flex: 1,
            textAlign: 'center'
        },
        text: {
            color: 'red'
        }
    },
    start: {
        container: {
            display: 'inline-block'
        },
        input: {}
    },
    separator: {
        container: {
            display: 'inline-block',
            marginTop: 15,
            paddingLeft: 10,
            paddingRight: 10
        },
        typography: {
            color: 'black'
        }
    },
    end: {
        container: {
            display: 'inline-block'
        },
        input: {

        }
    }
}
0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago