creativetimofficial / ct-black-dashboard-pro-react

Black Dashboard PRO React: A premium Boostrap & Reactstrap Admin Template
https://www.creative-tim.com/product/black-dashboard-pro-react
40 stars 19 forks source link

Broken bootstrap's InputGroupAddon styles #6

Closed MarkEhr closed 4 years ago

MarkEhr commented 5 years ago

Please answer the following questions for yourself before submitting an issue.

Expected Behavior

When using InputGroupAddon's on input groups, the addons should be the same height as the input and match the background/no background of the input

Current Behavior

Different height on addon when using anything other than an icon. When using type="append" the background is always white and text color is white as well.

Steps to Reproduce

Add this code anywhere in the template:

        <InputGroup>
            <InputGroupAddon addonType="prepend">
                <InputGroupText>$</InputGroupText>
            </InputGroupAddon>
            <Input  />
            <InputGroupAddon addonType="append">
                <InputGroupText><i className="tim-icons icon-single-02" /></InputGroupText>
            </InputGroupAddon>
        </InputGroup>

image

einazare commented 5 years ago

Hello there @MarkEhr ,

Thank you for your interest in working with our product. Please create a new scss file and import it inside our own scss main file (src/assets/scss/black-dashboard-pro-react.scss) and then add the following lines of code:

.input-group-text{
  line-height: 1;
}
.form-control + .input-group-append .input-group-text, .form-control + .input-group-prepend .input-group-text {
  background-color: transparent;
}
.input-group-append, .input-group-prepend {
  border: none;
}
.input-group .form-control:not(:first-child):not(:last-child), .input-group-btn:not(:first-child):not(:last-child){
  border-right: none;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

Sorry for this inconvenience. We'll repair this on our next update.

Best, Manu