Skip to content

Commit

Permalink
fix(Navigation): change request permission button [YTFRONT-4379]
Browse files Browse the repository at this point in the history
  • Loading branch information
SimbiozizV committed Oct 15, 2024
1 parent 5a25c2f commit c134120
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import cn from 'bem-cn-lite';
import React, {useCallback, useMemo} from 'react';
import {DialogField, FormApi, YTDFDialog, makeErrorFields} from '../../../components/Dialog';
import ErrorBoundary from '../../../components/ErrorBoundary/ErrorBoundary';
import Button from '../../../components/Button/Button';
import {Button, ButtonProps} from '@gravity-ui/uikit';
import PermissionsControl from '../RequestPermissions/PermissionsControl/PermissionsControl';

import withVisible, {WithVisibleProps} from '../../../hocs/withVisible';
Expand Down Expand Up @@ -42,6 +42,7 @@ export type RequestPermissionsFieldsNames =
export interface Props extends WithVisibleProps {
className?: string;
buttonClassName?: string;
buttonProps?: ButtonProps;
cluster?: string;
normalizedPoolTree?: string;
path: string;
Expand Down Expand Up @@ -93,6 +94,7 @@ function RequestPermissions(props: Props) {
error,
cluster,
columnGroups,
buttonProps,
/*denyColumns,*/
} = props;

Expand Down Expand Up @@ -295,9 +297,10 @@ function RequestPermissions(props: Props) {
return !choices?.length ? null : (
<ErrorBoundary>
<div className={block(null, className)}>
<Button className={buttonClassName} view={'action'} onClick={onShow}>
<Button className={buttonClassName} view="action" {...buttonProps} onClick={onShow}>
{title}
</Button>

<YTDFDialog<FormValues>
pristineSubmittable
onClose={onClose}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ class Navigation extends Component {
path={pathForRequest}
cluster={cluster}
buttonText={textForRequest}
buttonProps={{size: 'l', width: 'max'}}
/>
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@
margin-top: 20px;
}

&__request-permissions-button {
height: 100%;
width: 100%;
}

&__viewer {
padding-top: 20px;

Expand Down

0 comments on commit c134120

Please sign in to comment.