Commit 4c6ff191 authored by Imran Salam's avatar Imran Salam
Browse files

add enabled flag to launchbar config and make grey icon mandatory

parent cedc2e20
......@@ -32,7 +32,7 @@ export const LaunchbarIcon: FunctionComponent<LaunchbarIconProps> = (
export function getAppIcon(props: LaunchbarIconProps): string {
const { app, currentApp } = props;
if (app.icon.grey) {
if (app.enabled === false) {
return app.icon.grey;
} else {
return currentApp === app.name ? app.icon.selected : app.icon.default;
......
......@@ -49,9 +49,10 @@ import helpGreyIcon from 'static/img/launchbar/help-grey.svg';
export type LaunchbarApp = {
description: string;
enabled: boolean;
icon: {
default: string;
grey?: string;
grey: string;
selected: string;
};
name: string;
......@@ -71,8 +72,10 @@ export type LaunchbarDetails = {
export const launchbarConfig: LaunchbarDetails = {
about: {
description: 'About Ensembl',
enabled: true,
icon: {
default: ensemblIcon,
grey: '',
selected: ensemblSelectedIcon
},
name: 'about'
......@@ -82,6 +85,7 @@ export const launchbarConfig: LaunchbarDetails = {
apps: [
{
description: 'Global search',
enabled: false,
icon: {
default: searchIcon,
grey: searchGreyIcon,
......@@ -91,6 +95,7 @@ export const launchbarConfig: LaunchbarDetails = {
},
{
description: 'Species selector',
enabled: false,
icon: {
default: speciesSelectorIcon,
grey: speciesSelectorGreyIcon,
......@@ -106,8 +111,10 @@ export const launchbarConfig: LaunchbarDetails = {
apps: [
{
description: 'Browser',
enabled: true,
icon: {
default: browserIcon,
grey: '',
selected: browserSelectedIcon
},
name: 'browser'
......@@ -160,6 +167,7 @@ export const launchbarConfig: LaunchbarDetails = {
// }
{
description: 'Tools',
enabled: false,
icon: {
default: vepIcon,
grey: toolsGreyIcon,
......@@ -191,6 +199,7 @@ export const launchbarConfig: LaunchbarDetails = {
// }
{
description: 'Downloads',
enabled: false,
icon: {
default: customDownloadIcon,
grey: downloadGreyIcon,
......@@ -206,6 +215,7 @@ export const launchbarConfig: LaunchbarDetails = {
apps: [
{
description: 'Help & documentation',
enabled: false,
icon: {
default: helpIcon,
grey: helpGreyIcon,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment