react-placeholder icon indicating copy to clipboard operation
react-placeholder copied to clipboard

Incompatible with tailwind

Open FranciscoKloganB opened this issue 3 years ago • 1 comments

Recently detected that it is not possible to define width and height using tailwind directives because defaultStyles, is applied on rect.

const RectShape: React.FC<Props> = ({ className, style, color }) => {
  const defaultStyle = {
    backgroundColor: color,
    width: '100%',
    height: '100%',
    marginRight: 10
  };

  return (
    <div
      className={joinClassNames('rect-shape', className)}
      style={{ ...defaultStyle, ...style }}
    />
  );
};

Would you mind modifying the API to support these use cases or would you be open to a PR without breaking changes, which allowed both behaviours?

FranciscoKloganB avatar Sep 26 '22 19:09 FranciscoKloganB

I'd be happy to look at a PR if you'd like to add the use case without breaking changes.

BrianMitchL avatar Sep 27 '22 19:09 BrianMitchL