react-awesome-button icon indicating copy to clipboard operation
react-awesome-button copied to clipboard

Error When using cssModule

Open njho opened this issue 6 years ago • 7 comments

I receive the following error when attempting to use the cssModule prop as I would like to change the height of the button.

I'm using a CSS Pre-processor as per: https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#adding-a-css-preprocessor-sass-less-etc

Failed to execute 'remove' on 'DOMTokenList': The token provided must not be empty. Why might this be happening?

image

njho avatar Apr 22 '18 22:04 njho

I am also having the same problem.

OmkarKirpan avatar Aug 21 '18 07:08 OmkarKirpan

I still have the same problem

CherryNerd avatar Aug 13 '19 14:08 CherryNerd

I LOVE IT! Too bad it doesn't work :(

impactcolor avatar Nov 15 '19 06:11 impactcolor

The following worked for me if your goal is to override the CSS (like changing height) Find the root class name for the button using inspect in the browser. For example aws-btn Write the new css required in a .css file. Example, test.css

.aws-btn {
    height:  140px;
}

Import the css file into your component import "../test.css";

Hope it helps.

hariananthan avatar Mar 11 '20 10:03 hariananthan

.aws-btn { height: 140px; }

this didn't work for me.

this issue has been open for 2 years - all it takes to reproduce is really the simplest example button placed in the simplest project made with create-react-app

@rcaferati any ideas ?

ericcastro avatar Apr 15 '20 08:04 ericcastro

@hariananthan technique worked for me but it is extremely buggy. e.g. sometimes when I refresh my browser, it doesn't recognize the css file, however, when I comment out import "../test.css", save, uncomment, then save again, it re-recognizes the CSS file.

eakeyson1 avatar May 27 '21 16:05 eakeyson1

Did anyone find the fix yet?

abhishekUpmanyu avatar Sep 14 '21 17:09 abhishekUpmanyu