+
+
+ {children && {children}}
+ {suffixIcon && }
+
+
+
+ );
+}
+
+const getStyles = (theme: GrafanaTheme2) => {
+ return {
+ root: css({
+ ...theme.typography.bodySmall,
+ willChange: 'transform',
+ background: theme.components.tooltip.background,
+ color: theme.components.tooltip.text,
+ padding: theme.spacing(0.5, 1.5), // get's an extra .5 of vertical padding to account for the rounded corners
+ borderRadius: 100, // just a sufficiently large value to ensure ends are completely rounded
+ display: 'inline-flex',
+ gap: theme.spacing(0.5),
+ alignItems: 'center',
+ }),
+ };
+};
+
+const createAnimation = (fromX: string | number, fromY: string | number) =>
+ keyframes({
+ from: {
+ opacity: 0,
+ transform: `translate(${fromX}, ${fromY})`,
+ },
+
+ to: {
+ opacity: 1,
+ transform: 'translate(0, 0px)',
+ },
+ });
+
+const getPlacementStyles = (theme: GrafanaTheme2): Record