Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
kglovern committed Aug 22, 2023
2 parents e80188f + eba8ef2 commit 0bc79e6
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 7 deletions.
16 changes: 11 additions & 5 deletions src/app/components/TabbedWidget/Tabs.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import WidgetStyles from '../Widget/index.styl';
import styles from './index.styl';


const Tabs = ({ className, tabs, activeTabIndex, onClick, ...props }) => {
const Tabs = ({ className, tabs, activeTabIndex, onClick, sx, ...props }) => {
return (
<MuiTabs
value={activeTabIndex}
Expand All @@ -43,9 +43,8 @@ const Tabs = ({ className, tabs, activeTabIndex, onClick, ...props }) => {
[`& .${tabsClasses.scrollButtons}`]: {
'&.Mui-disabled': { opacity: 0.3 },
},
[`& .${tabsClasses.flexContainer}`]: {
justifyContent: 'space-between'
},
minHeight: '32px',
...sx,
}}
{...props}
className={classNames(
Expand All @@ -55,7 +54,14 @@ const Tabs = ({ className, tabs, activeTabIndex, onClick, ...props }) => {
)}
>
{
tabs.map((tab) => (<Tab key={`tab-${tab.widgetId}`} label={tab.label} />))
tabs.map((tab) => (
<Tab
key={`tab-${tab.widgetId}`}
label={tab.label}
disabled={tab.disabled}
sx={{ minWidth: '75px', minHeight: '16px', padding: '8px', flexGrow: '1' }}
/>
))
}
</MuiTabs>
);
Expand Down
14 changes: 12 additions & 2 deletions src/app/widgets/SecondaryFunctionality/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,18 @@

import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { tabsClasses } from '@mui/material/Tabs';

import store from 'app/store';
import TabbedWidget from 'app/components/TabbedWidget';
import controller from 'app/lib/controller';
import CoolantWidget from 'app/widgets/Coolant';

import WidgetConfig from '../WidgetConfig';
import ProbeWidget from '../Probe';
import RotaryWidget from '../Rotary';
import MacroWidget from '../Macro';
import ConsoleWidget from '../Console';

import SpindleWidget from '../Spindle';

import { MODAL_NONE, } from './constants';
Expand Down Expand Up @@ -205,7 +206,16 @@ class SecondaryFunctionality extends PureComponent {
return (
<TabbedWidget fullscreen={isFullscreen}>
<div style={{ display: 'flex', flexDirection: 'column', height: '100%' }}>
<TabbedWidget.Tabs tabs={filteredTabs} activeTabIndex={activeTab} onClick={actions.handleTabSelect} />
<TabbedWidget.Tabs
tabs={filteredTabs}
activeTabIndex={activeTab}
onClick={actions.handleTabSelect}
sx={{
[`& .${tabsClasses.flexContainer}`]: {
justifyContent: 'space-between'
},
}}
/>
<TabbedWidget.Content>
{
filteredTabs.map((tab, index) => {
Expand Down

0 comments on commit 0bc79e6

Please sign in to comment.