Skip to content

Commit

Permalink
Use Button component
Browse files Browse the repository at this point in the history
  • Loading branch information
dhruvisompura committed Jan 18, 2025
1 parent d79808e commit e8925f7
Showing 1 changed file with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import { PositronModalDialog } from '../../../../browser/positronComponents/posi
import { PositronModalReactRenderer } from '../../../../browser/positronModalReactRenderer/positronModalReactRenderer.js';
import { LabeledTextInput } from '../../../../browser/positronComponents/positronModalDialog/components/labeledTextInput.js';
import { PlatformNativeDialogActionBar } from '../../../../browser/positronComponents/positronModalDialog/components/platformNativeDialogActionBar.js';
import { Button } from '../../../../../base/browser/ui/positronComponents/button/button.js';

/**
* SetPlotSizeResult interface.
Expand Down Expand Up @@ -100,22 +101,22 @@ const SetPlotSizeModalDialog = (props: SetPlotSizeModalDialogProps) => {
};

const okButton = (
<button
<Button
className='action-bar-button default'
tabIndex={0}
onClick={acceptHandler}
onPressed={acceptHandler}
>
{(() => localize('positronOK', "OK"))()}
</button>
</Button>
);
const cancelButton = (
<button
<Button
className='action-bar-button'
tabIndex={0}
onClick={cancelHandler}
onPressed={cancelHandler}
>
{(() => localize('positronCancel', "Cancel"))()}
</button>
</Button>
);

// Render.
Expand Down Expand Up @@ -153,13 +154,13 @@ const SetPlotSizeModalDialog = (props: SetPlotSizeModalDialogProps) => {

<div className='plot-size-action-bar top-separator'>
<div className='left'>
<button
<Button
className='action-bar-button'
tabIndex={0}
onClick={deleteHandler}
onPressed={deleteHandler}
>
{(() => localize('positronDeletePlotSize', "Delete"))()}
</button>
</Button>
</div>
<div className='right'>
<PlatformNativeDialogActionBar secondaryButton={cancelButton} primaryButton={okButton} />
Expand Down

0 comments on commit e8925f7

Please sign in to comment.