react-component / react-component/tooltip

Styling with Emotion's css prop

Open
#468 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
944
Forks
199
Avg merge
19h 1m
Merged PRs (30d)
3

Description

I tried styling the tooltip with Emotion's css prop:

const tooltipStyle = css`
  .rc-tooltip {
    background: yellow;

    &.rc-tooltip-hidden {
      display: none;
    }
  }
`;

function handle (node) {
  return (
    <Tooltip css={tooltipStyle} placement="top" overlay={<span>tooltip</span>}>
      { node }
    </Tooltip>
  );
}

But the styles aren't being applied. What could be the reason?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue does not name a source file or test. Start by reproducing the provided Tooltip and Emotion css-prop example, then inspect how Tooltip receives and forwards styling props. Done means identifying why the styles are not applied and documenting or correcting the behavior with a regression check.

Written by the indexing model from the issue text.

Assessment

Tech stack
react
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.