Wire up tracking to Sandy Chrome
Summary: Wired up tracking to all chrome sections and some import UI elements Reviewed By: jknoxville Differential Revision: D25219089 fbshipit-source-id: c75bed91894609dafc5fcc6423a5228211fb92d8
This commit is contained in:
committed by
Facebook GitHub Bot
parent
dd6f39c2b3
commit
84c6e05b8a
@@ -12,6 +12,7 @@ import Tooltip from './Tooltip';
|
||||
import {colors} from './colors';
|
||||
import styled from '@emotion/styled';
|
||||
import React from 'react';
|
||||
import {Tracked} from 'flipper-plugin';
|
||||
|
||||
type Props = React.ComponentProps<typeof ToolbarIconContainer> & {
|
||||
active?: boolean;
|
||||
@@ -30,17 +31,19 @@ const ToolbarIconContainer = styled.div({
|
||||
export default function ToolbarIcon({active, icon, title, ...props}: Props) {
|
||||
return (
|
||||
<Tooltip title={title}>
|
||||
<ToolbarIconContainer {...props}>
|
||||
<Glyph
|
||||
name={icon}
|
||||
size={16}
|
||||
color={
|
||||
active
|
||||
? colors.macOSTitleBarIconSelected
|
||||
: colors.macOSTitleBarIconActive
|
||||
}
|
||||
/>
|
||||
</ToolbarIconContainer>
|
||||
<Tracked action={title}>
|
||||
<ToolbarIconContainer {...props}>
|
||||
<Glyph
|
||||
name={icon}
|
||||
size={16}
|
||||
color={
|
||||
active
|
||||
? colors.macOSTitleBarIconSelected
|
||||
: colors.macOSTitleBarIconActive
|
||||
}
|
||||
/>
|
||||
</ToolbarIconContainer>
|
||||
</Tracked>
|
||||
</Tooltip>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user