+
{
+ const styles = {
+ position: 'absolute',
+ width: '8px',
+ height: '8px',
+ background: 'inherit'
+ }
+ if (position === 'top') {
+ styles.bottom = '0'
+ styles.left = '50%'
+ styles.transform = 'translateX(-50%) translateY(50%) rotate(45deg)'
+ } else if (position === 'bottom') {
+ styles.top = '0'
+ styles.left = '50%'
+ styles.transform = 'translateX(-50%) translateY(-50%) rotate(45deg)'
+ } else if (position === 'left') {
+ styles.right = '0'
+ styles.top = '50%'
+ styles.transform = 'translateX(50%) translateY(-50%) rotate(45deg)'
+ } else if (position === 'right') {
+ styles.left = '0'
+ styles.top = '50%'
+ styles.transform = 'translateX(-50%) translateY(-50%) rotate(45deg)'
+ }
+ return styles
+ })()}>
-
{content}
+ {content}
{shortcut && (
-
{shortcut}
+
{shortcut}
)}
)}
-
-
- >
+