Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Environment tag #20295

Merged
merged 15 commits into from
Aug 26, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Change tag to Label component
  • Loading branch information
reesercollins committed Jun 21, 2022
commit 9e72f3d9d33e1d3d43f44999110b25de02be851d
14 changes: 9 additions & 5 deletions superset-frontend/src/views/components/MenuRight.tsx
Original file line number Diff line number Diff line change
@@ -32,10 +32,9 @@ import {
import { MainNav as Menu } from 'src/components/Menu';
import { Tooltip } from 'src/components/Tooltip';
import Icons from 'src/components/Icons';
import Label from 'src/components/Label';
import findPermission, { isUserAdmin } from 'src/dashboard/util/findPermission';
import { UserWithPermissionsAndRoles } from 'src/types/bootstrapTypes';
import { RootState } from 'src/dashboard/types';
import { Tag } from 'antd';
import LanguagePicker from './LanguagePicker';
import DatabaseModal from '../CRUD/data/database/DatabaseModal';
import { uploadUserPerms } from '../CRUD/utils';
@@ -45,6 +44,7 @@ import {
RightMenuProps,
} from './types';
import { MenuObjectProps } from './Menu';
import { RootState } from 'src/dashboard/types';

const versionInfoStyles = (theme: SupersetTheme) => css`
padding: ${theme.gridUnit * 1.5}px ${theme.gridUnit * 4}px
@@ -82,6 +82,10 @@ const StyledAnchor = styled.a`
padding-left: ${({ theme }) => theme.gridUnit}px;
`;

const tagStyles = (theme: SupersetTheme) => css`
color: ${theme.colors.grayscale.light5};
`;

const { SubMenu } = Menu;

const RightMenu = ({
@@ -270,9 +274,9 @@ const RightMenu = ({
/>
)}
{environmentTag.text && (
<Tag css={{ borderRadius: '500px' }} color={environmentTag.color}>
{environmentTag.text}
</Tag>
<Label css={{ borderRadius: '500px' }} color={environmentTag.color}>
<span css={tagStyles}>{environmentTag.text}</span>
</Label>
)}
<Menu
selectable={false}