Commit 60709785 authored by Maxym Borodenko's avatar Maxym Borodenko Committed by Matija Obreza

Updated Button variant

- The `flat` variant will be removed in the next major release. `text` is equivalent and should be used instead.
parent 5b6145d8
......@@ -62,7 +62,7 @@ const InstituteForm = ({ error, handleSubmit, initialValues, wiewsCode, t }) =>
<div className="pt-20">
<Button variant="contained" type="submit">{ t('common:action.saveChanges') }</Button>
<Link to={ `/wiews/${wiewsCode || ''}` }>
<Button variant="flat">{ t('common:action.backTo', { where: `${wiewsCode ? t('institutes.common.instDetails', { instCode: wiewsCode }) : t('institutes.common.instList')}` }) }</Button>
<Button variant="text">{ t('common:action.backTo', { where: `${wiewsCode ? t('institutes.common.instDetails', { instCode: wiewsCode }) : t('institutes.common.instList')}` }) }</Button>
</Link>
</div>
</form>
......
......@@ -37,7 +37,7 @@ interface IDimensionDialogProps extends React.ClassAttributes<any> {
dimTitle: string;
dimension: Dimension<any>;
useLink: boolean;
variant?: 'text' | 'flat' | 'outlined' | 'contained' | 'contained' | 'fab' | 'extendedFab';
variant?: 'text' | 'outlined' | 'contained' | 'contained' | 'fab' | 'extendedFab';
t: any;
}
......
......@@ -33,7 +33,7 @@ interface IExecutionDialogProps extends React.ClassAttributes<any> {
execution: Execution;
buttonLabel?: string;
classes: any;
variant?: 'text' | 'flat' | 'outlined' | 'contained' | 'contained' | 'fab' | 'extendedFab';
variant?: 'text' | 'outlined' | 'contained' | 'contained' | 'fab' | 'extendedFab';
t: any;
}
......
......@@ -34,7 +34,7 @@ interface IParameterDialogProps extends React.ClassAttributes<any> {
useLink: boolean;
classes: any;
parameter: KPIParameter;
variant?: 'text' | 'flat' | 'outlined' | 'contained' | 'contained' | 'fab' | 'extendedFab';
variant?: 'text' | 'outlined' | 'contained' | 'contained' | 'fab' | 'extendedFab';
t: any;
}
......
......@@ -31,7 +31,7 @@ interface ICreateFolderDialogProps extends React.ClassAttributes<any> {
root?: string;
path?: string;
classes: any;
variant?: 'text' | 'flat' | 'outlined' | 'contained' | 'contained' | 'fab' | 'extendedFab';
variant?: 'text' | 'outlined' | 'contained' | 'contained' | 'fab' | 'extendedFab';
t: any;
}
......
......@@ -137,7 +137,7 @@ class RepositoryBrowser extends React.Component<IRepositoryBrowserProps, any> {
{ folder.folder && folder.folder._permissions.delete && <Button onClick={ this.deleteFolder } key="deletef" variant="contained">{ t('repository.admin.p.repositoryBrowser.deleteFolder') }</Button> }
{ (! folder.folder || (folder.folder && folder.folder._permissions.create)) && <CreateFolderDialog root={ root } path={ path } /> }
{ folder.folder && folder.folder._permissions.write && <UpdateFolderDialog/> }
{ folder.folder && folder.folder._permissions.manage && <Permissions clazz={ RepositoryFolder.clazz } id={ folder.folder.id } /> }
{ folder.folder && folder.folder._permissions.manage && <Permissions clazz={ RepositoryFolder.clazz } id={ folder.folder.id } variant="contained" /> }
</span>
} />
<PageContents className={ `container-spacing-horizontal pt-1rem` }>
......
......@@ -29,7 +29,7 @@ interface IUpdateFolderDialogProps extends React.ClassAttributes<any> {
updateFolder: (folder: RepositoryFolder) => Promise<FolderDetails>;
folder: FolderDetails;
classes: any;
variant?: 'text' | 'flat' | 'outlined' | 'contained' | 'contained' | 'fab' | 'extendedFab';
variant?: 'text' | 'outlined' | 'contained' | 'contained' | 'fab' | 'extendedFab';
t: any;
}
......
......@@ -111,7 +111,7 @@ const FileCard = ({file, classes, compact = false, edit = false, deleteFile, edi
<div className={ classes.actions }>
<span><ActionButton action={ () => editFile(file.uuid) } title={ t('common:action.edit') } /></span>
<span><ActionButton action={ () => deleteFile(file.uuid) } title={ t('common:action.delete') } /></span>
{ file && file._permissions.manage && <Permissions clazz={ className } id={ file.id } /> }
{ file && file._permissions.manage && <Permissions clazz={ className } id={ file.id } variant="contained" /> }
</div>
}
/>
......
......@@ -2,7 +2,7 @@ import * as React from 'react';
import Button from '@material-ui/core/Button';
interface IActionButtonProps extends React.ClassAttributes<any> {
variant?: 'text' | 'flat' | 'outlined' | 'contained' | 'contained' | 'fab' | 'extendedFab';
variant?: 'text' | 'outlined' | 'contained' | 'contained' | 'fab' | 'extendedFab';
title: string;
action: any;
style?: any;
......
......@@ -30,6 +30,10 @@ const styles = (theme) => ({
},
menuItem: {
padding: '6px 0',
'& > div, & > span': {
width: '100%',
margin: '0 !important',
},
'& button': {
width: '100%',
height: '100%',
......
......@@ -4,7 +4,7 @@ import Button from '@material-ui/core/Button';
interface IUploadButtonProps extends React.ClassAttributes<any> {
handleUploading: (files: File[]) => void;
variant?: 'text' | 'flat' | 'outlined' | 'contained' | 'contained' | 'fab' | 'extendedFab';
variant?: 'text' | 'outlined' | 'contained' | 'contained' | 'fab' | 'extendedFab';
title?: string;
multiple?: boolean;
style?: any;
......
......@@ -44,7 +44,7 @@ interface IPermissionsProps extends React.ClassAttributes<any> {
updateParentObject: (id: number, parentId: number) => Promise<AclObjectIdentity>;
change: any;
classes: any;
variant?: 'text' | 'flat' | 'outlined' | 'contained' | 'contained' | 'fab' | 'extendedFab';
variant?: 'text' | 'outlined' | 'contained' | 'contained' | 'fab' | 'extendedFab';
t: any;
}
......@@ -123,7 +123,7 @@ class Permissions extends React.Component<IPermissionsProps, any> {
}
public render() {
const {autocomplete, variant = 'flat', t } = this.props;
const {autocomplete, variant = 'text', t } = this.props;
const {aclObjectIdentity, autocompleteObj} = this.state;
return (
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment