yuai-tooltip
TypeScript icon, indicating that this package has built-in type declarations

0.2.9 • Public • Published

yuai-tooltip

Build Size PeerDependencies LatestVersion License

React tooltip components with styled-components

Install

yarn install yuai-tooltip react styled-components

Components

Tooltip

import * as React from 'react';
import styled from 'styled-components';
import { Tooltip, Position } from 'yuai-tooltip';
 
const StyledTooltip = styled(Tooltip)`
  float: right;
 
  .yuai-tooltip {
    background: #fff;
    text-align: left;
    font-size: 14px;
    box-shadow: 0 2px 2px #aaa;
    z-index: 1;
  }
`;
 
const HelloWorld = () => {
  const content = (
    <ul>
      <li>Settings</li>
      <li>Sign Out</li>
    </ul>
  );
  return (
    <StyledTooltip content={content} position={Position.BOTTOM_RIGHT}>
      <Avatar />
    </StyledTooltip>
  );
};

License

MIT

Package Sidebar

Install

npm i yuai-tooltip

Weekly Downloads

1

Version

0.2.9

License

MIT

Unpacked Size

7.67 kB

Total Files

8

Last publish

Collaborators

  • ozylog