Make sure Lite app uses FB branding
Summary: Fixes https://fb.workplace.com/groups/flippersupport/permalink/1038883216592336/ Reviewed By: passy Differential Revision: D25557366 fbshipit-source-id: 7b821ad7cd52454294482a00c5dc59c57b85f757
This commit is contained in:
committed by
Facebook GitHub Bot
parent
d08aa5d33e
commit
658b3e8a91
@@ -138,20 +138,20 @@ const AppInspectButton = styled(Button)({
|
||||
});
|
||||
|
||||
function AppIcon({appname}: {appname?: string}) {
|
||||
const invert = appname?.endsWith('Lite') ?? false;
|
||||
const brandName = appname?.replace(/ Lite$/, '');
|
||||
const color = brandName
|
||||
? getColorByApp(brandName)
|
||||
: theme.backgroundTransparentHover;
|
||||
const icon = brandName && (brandIcons as any)[brandName];
|
||||
return (
|
||||
<AppIconContainer
|
||||
style={{background: brandName != appname ? 'white' : color}}>
|
||||
<AppIconContainer style={{background: invert ? 'white' : color}}>
|
||||
{icon && (
|
||||
<Glyph
|
||||
name={icon}
|
||||
size={24}
|
||||
variant="outline"
|
||||
color={brandName != appname ? color : 'white'}
|
||||
color={invert ? color : 'white'}
|
||||
/>
|
||||
)}
|
||||
</AppIconContainer>
|
||||
|
||||
@@ -278,6 +278,7 @@ export const darkColors = {
|
||||
|
||||
export const brandColors = {
|
||||
Facebook: '#0D7BED',
|
||||
Lite: '#0D7BED',
|
||||
Messenger: '#0088FA',
|
||||
Instagram: '#E61E68',
|
||||
WhatsApp: '#25D366',
|
||||
@@ -289,6 +290,7 @@ export const brandColors = {
|
||||
// https://www.internalfb.com/intern/assets/set/facebook_icons/
|
||||
export const brandIcons = {
|
||||
Facebook: 'app-facebook-f',
|
||||
Lite: 'app-facebook-f',
|
||||
Messenger: 'app-messenger',
|
||||
Instagram: 'app-instagram',
|
||||
WhatsApp: 'app-whatsapp',
|
||||
|
||||
Reference in New Issue
Block a user