Skip to content

showDeclineButton seems to do nothingΒ #29

@pierreavizou

Description

@pierreavizou

It looks like setting showDeclineButton to true does not cause the decline button to show up.

Here's the code I'm testing with:

<CookieBanner
        className="dark:bg-gray-50 dark:text-gray-800 bg-gray-800 text-gray-50"
        styles={{
          dialog: {
            position: 'fixed',
            bottom: 0,
            left: 0,
            right: 0,
            padding: '10px',
          }
        }}
        statisticsDefaultChecked={true}
        message="Cookie banner message"
        showDeclineButton={true}
        declineButtonText="Decline All"
        wholeDomain={true}
        onAccept = {() => {}}
        onAcceptPreferences = {() => {}}
        onAcceptStatistics = {() => {}}
        onAcceptMarketing = {() => {}}
/>

Which gives the result below:
image
As you can see there is no decline button.

It would be quite useful because new regulations in Europe require that "declining must be as easy as accepting".
Also let me know if I've missed something 😁

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions