ngx-cookieconsent icon indicating copy to clipboard operation
ngx-cookieconsent copied to clipboard

[Feature] Styling for the deny button

Open TobiasJu opened this issue 1 month ago • 0 comments

Is your feature request related to a problem? Please describe

Currently there is no easy way to change the background of the "Refuse cookies" button.

In the cookieconsent.min.css is the background color set to transparent.

.cc-highlight .cc-btn:first-child {
    background-color: transparent;
    border-color: transparent;
}

Describe the idea you'd like

In the NgcCookieConsentConfig should be an option denyButton :

const cookieConfig: NgcCookieConsentConfig = {
palette: {
    popup: {
      background: 'rgba(0,0,0,0.96)',
      text: '#ffffff',
      link: '#ffffff',
    },
    button: {
      background: '#4BFF31FF',
      text: '#FFFFFF',
      border: 'transparent',
    },
    denyButton: {
      background: '#BB2727FF',
      text: '#D7D7D7FF',
      border: 'transparent',
    },

Describe alternatives you've considered

Using the deprecated ng-deep override does also not work.

:host ::ng-deep .cc-deny {
  background-color: rgb(86, 172, 62) !important;
}

Additional context

I use Angular 16.

TobiasJu avatar May 13 '24 16:05 TobiasJu