yuai-tooltip
v0.2.9
Published
React tooltip components with styled-components
Downloads
3
Maintainers
Readme
yuai-tooltip
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