Make the color of the Entity Context Menu icon configurable
Signed-off-by: Olivier Liechti <olivier.liechti@wasabi-tech.com>
This commit is contained in:
@@ -32,12 +32,17 @@ import { IconComponent } from '@backstage/core-plugin-api';
|
||||
import { useEntityPermission } from '@backstage/plugin-catalog-react';
|
||||
import { catalogEntityDeletePermission } from '@backstage/plugin-catalog-common';
|
||||
|
||||
// TODO(freben): It should probably instead be the case that Header sets the theme text color to white inside itself unconditionally instead
|
||||
const useStyles = makeStyles({
|
||||
button: {
|
||||
color: 'white',
|
||||
},
|
||||
});
|
||||
/** @public */
|
||||
export type EntityContextMenuClassKey = 'button';
|
||||
|
||||
const useStyles = makeStyles(
|
||||
theme => ({
|
||||
button: {
|
||||
color: 'white',
|
||||
},
|
||||
}),
|
||||
{ name: 'PluginCatalogEntityContextMenu' },
|
||||
);
|
||||
|
||||
// NOTE(freben): Intentionally not exported at this point, since it's part of
|
||||
// the unstable extra context menu items concept below
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* Copyright 2021 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export { EntityContextMenu } from './EntityContextMenu';
|
||||
export type { EntityContextMenuClassKey } from './EntityContextMenu';
|
||||
@@ -18,11 +18,13 @@ import { StyleRules } from '@material-ui/core/styles/withStyles';
|
||||
|
||||
import { EntityLinksEmptyStateClassKey } from './components/EntityLinksCard';
|
||||
import { SystemDiagramCardClassKey } from './components/SystemDiagramCard';
|
||||
import { EntityContextMenuClassKey } from './components/EntityContextMenu';
|
||||
|
||||
/** @public */
|
||||
export type PluginCatalogComponentsNameToClassKey = {
|
||||
PluginCatalogEntityLinksEmptyState: EntityLinksEmptyStateClassKey;
|
||||
PluginCatalogSystemDiagramCard: SystemDiagramCardClassKey;
|
||||
PluginCatalogEntityContextMenu: EntityContextMenuClassKey;
|
||||
};
|
||||
|
||||
/** @public */
|
||||
|
||||
Reference in New Issue
Block a user