Skip to content

Styling with Emotion's css prop #468

Open
@weiying-chen

Description

@weiying-chen

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?

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