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

fix: Tab Panels contents should take up the full height #340

Merged
merged 3 commits into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
8 changes: 0 additions & 8 deletions plugins/ui/src/deephaven/ui/components/spectrum/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,6 @@ def icon_wrapper(*children, **props):
return spectrum_element("Icon", *children, **props)


def item(*children, **props):
"""
Python implementation for the Adobe React Spectrum Item component.
Used with Tabs: https://react-spectrum.adobe.com/react-spectrum/Tabs.html
"""
return spectrum_element("Item", *children, **props)


def illustrated_message(*children, **props):
"""
Python implementation for the Adobe React Spectrum IllustratedMessage component.
Expand Down
2 changes: 1 addition & 1 deletion plugins/ui/src/js/src/elements/SpectrumElementUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
Switch,
Tabs,
TabList,
TabPanels,
Text,
ToggleButton,
View,
Expand All @@ -25,6 +24,7 @@ import {
Form,
RangeSlider,
Slider,
TabPanels,
TextField,
} from './spectrum';
import { ELEMENT_KEY, ElementNode, isElementNode } from './ElementUtils';
Expand Down
21 changes: 21 additions & 0 deletions plugins/ui/src/js/src/elements/spectrum/TabPanels.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import React from 'react';
import {
TabPanels as SpectrumTabPanels,
SpectrumTabPanelsProps,
} from '@adobe/react-spectrum';

function TabPanels(props: SpectrumTabPanelsProps<React.ReactNode>) {
const { UNSAFE_style: unsafeStyle, ...otherProps } = props;

return (
<SpectrumTabPanels
// eslint-disable-next-line react/jsx-props-no-spreading
{...otherProps}
UNSAFE_style={{ display: 'flex', ...unsafeStyle }}
/>
);
}

TabPanels.displayName = 'TabPanels';

export default TabPanels;
1 change: 1 addition & 0 deletions plugins/ui/src/js/src/elements/spectrum/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ export { default as Flex } from './Flex';
export { default as Form } from './Form';
export { default as RangeSlider } from './RangeSlider';
export { default as Slider } from './Slider';
export { default as TabPanels } from './TabPanels';
export { default as TextField } from './TextField';
Loading