Skip to content

Commit

Permalink
fix: add wrapper to toggle_button (#821)
Browse files Browse the repository at this point in the history
- Add #812 
  - Change `toggle_button` to use a wrapper, like the other buttons
  - Update `UI-all-components-render-2` E2E test to reflect text being
wrapped
  • Loading branch information
wusteven815 authored Sep 13, 2024
1 parent 7e51073 commit fff1d6c
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 1 deletion.
18 changes: 18 additions & 0 deletions plugins/ui/src/js/src/elements/ToggleButton.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import React from 'react';
import {
ToggleButton as DHCToggleButton,
ToggleButtonProps as DHCToggleButtonProps,
} from '@deephaven/components';
import { useButtonProps } from './hooks/useButtonProps';
import { SerializedButtonEventProps } from './model/SerializedPropTypes';

export function ToggleButton(
props: SerializedButtonEventProps<DHCToggleButtonProps>
): JSX.Element {
const buttonProps = useButtonProps(props);

// eslint-disable-next-line react/jsx-props-no-spreading
return <DHCToggleButton {...buttonProps} />;
}

export default ToggleButton;
1 change: 1 addition & 0 deletions plugins/ui/src/js/src/elements/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@ export * from './Tabs';
export * from './TabPanels';
export * from './TextField';
export * from './TextArea';
export * from './ToggleButton';
export * from './UITable/UITable';
export * from './utils';
2 changes: 1 addition & 1 deletion plugins/ui/src/js/src/widget/WidgetUtils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import {
Switch,
TabList,
Text,
ToggleButton,
View,
} from '@deephaven/components';
import { ValueOf } from '@deephaven/utils';
Expand Down Expand Up @@ -67,6 +66,7 @@ import {
TabPanels,
TextField,
TextArea,
ToggleButton,
UITable,
Tabs,
} from '../elements';
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit fff1d6c

Please sign in to comment.