From 15b6918d498bec312bea23e5277db2997b040279 Mon Sep 17 00:00:00 2001 From: Lucas Di Pentima Date: Fri, 7 Jan 2022 15:52:51 -0300 Subject: [PATCH] 18219: Improves the edit button styling at the details panel. Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima --- .../details-panel/collection-details.tsx | 16 ++++++++++++++-- .../details-panel/project-details.tsx | 13 ++++++++++--- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/src/views-components/details-panel/collection-details.tsx b/src/views-components/details-panel/collection-details.tsx index f2b599e7..369c93e5 100644 --- a/src/views-components/details-panel/collection-details.tsx +++ b/src/views-components/details-panel/collection-details.tsx @@ -18,7 +18,11 @@ import { navigateTo } from 'store/navigation/navigation-action'; import { openContextMenu, resourceUuidToContextMenuKind } from 'store/context-menu/context-menu-actions'; import { openCollectionUpdateDialog } from 'store/collections/collection-update-actions'; -export type CssRules = 'versionBrowserHeader' | 'versionBrowserItem' | 'versionBrowserField' | 'editIcon'; +export type CssRules = 'versionBrowserHeader' + | 'versionBrowserItem' + | 'versionBrowserField' + | 'editButton' + | 'editIcon'; const styles: StyleRulesCallback = theme => ({ versionBrowserHeader: { @@ -35,6 +39,11 @@ const styles: StyleRulesCallback = theme => ({ paddingRight: theme.spacing.unit/2, fontSize: '1.125rem', }, + editButton: { + boxShadow: 'none', + padding: '2px 10px 2px 5px', + fontSize: '0.75rem' + }, }); export class CollectionDetails extends DetailsData { @@ -99,7 +108,10 @@ const CollectionInfo = withStyles(styles)( ({ currentCollection, editCollection, classes }: CollectionInfoProps) => currentCollection !== undefined ?
- diff --git a/src/views-components/details-panel/project-details.tsx b/src/views-components/details-panel/project-details.tsx index c3c3d68e..8ed15b31 100644 --- a/src/views-components/details-panel/project-details.tsx +++ b/src/views-components/details-panel/project-details.tsx @@ -33,7 +33,7 @@ export class ProjectDetails extends DetailsData { } } -type CssRules = 'tag' | 'editIcon'; +type CssRules = 'tag' | 'editIcon' | 'editButton'; const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ tag: { @@ -43,7 +43,12 @@ const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ editIcon: { paddingRight: theme.spacing.unit/2, fontSize: '1.125rem', - } + }, + editButton: { + boxShadow: 'none', + padding: '2px 10px 2px 5px', + fontSize: '0.75rem' + }, }); interface ProjectDetailsComponentDataProps { @@ -70,7 +75,9 @@ const ProjectDetailsComponent = connect(null, mapDispatchToProps)( name: project.name, description: project.description, properties: project.properties, - })}> + })} + className={classes.editButton} variant='contained' + data-cy='details-panel-edit-btn' color='primary' size='small'> Edit : '' -- 2.30.2