Skip to content

Commit

Permalink
Fixed: disabled buttons in modeler toolbar appear to be 'under' the m…
Browse files Browse the repository at this point in the history
…odeler content
  • Loading branch information
jjoderis committed Dec 18, 2023
1 parent ec2777b commit 15c0460
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.Toolbar {
:global(.ant-btn-default:disabled) {
background-color: rgba($color: #eee, $alpha: 1);
}
}
4 changes: 3 additions & 1 deletion src/management-system-v2/components/modeler-toolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import type CommandStack from 'diagram-js/lib/command/CommandStack';
import { Tooltip, Button, Space, Select, SelectProps } from 'antd';
import { Toolbar, ToolbarGroup } from './toolbar';

import styles from './modeler-toolbar.module.scss';

import Icon, {
ExportOutlined,
SettingOutlined,
Expand Down Expand Up @@ -149,7 +151,7 @@ const ModelerToolbar: React.FC<ModelerToolbarProps> = ({ onOpenXmlEditor, versio

return (
<>
<Toolbar>
<Toolbar className={styles.Toolbar}>
<Space style={{ width: '100%', justifyContent: 'space-between' }} wrap>
<ToolbarGroup>
<Select
Expand Down
11 changes: 9 additions & 2 deletions src/management-system-v2/components/toolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,16 @@ import React, { PropsWithChildren } from 'react';

import { Space } from 'antd';

export const Toolbar: React.FC<PropsWithChildren> = ({ children }) => {
type ToolbarProps = {
className?: string;
};

export const Toolbar: React.FC<PropsWithChildren<ToolbarProps>> = ({ children, className }) => {
return (
<div style={{ position: 'absolute', zIndex: 10, padding: '12px', width: '100%' }}>
<div
className={className}
style={{ position: 'absolute', zIndex: 10, padding: '12px', width: '100%' }}
>
{children}
</div>
);
Expand Down

0 comments on commit 15c0460

Please sign in to comment.