Skip to content

Commit

Permalink
[Tooltip] Add support for horizontalPosition="right"
Browse files Browse the repository at this point in the history
Closes mui#6071
  • Loading branch information
LeeKevin authored and openersolutions committed Feb 7, 2017
1 parent cdab845 commit 3183751
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/internal/Tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ function getStyles(props, context, state) {
opacity: 0,
right: horizontalPosition === 'left' ? 12 : null,
left: horizontalPosition === 'center' ?
(state.offsetWidth - 48) / 2 * -1 : null,
(state.offsetWidth - 48) / 2 * -1 :
horizontalPosition === 'right' ? 12 : null,
transition: `${transitions.easeOut('0ms', 'top', '450ms')}, ${
transitions.easeOut('450ms', 'transform', '0ms')}, ${
transitions.easeOut('450ms', 'opacity', '0ms')}`,
Expand Down

0 comments on commit 3183751

Please sign in to comment.