Skip to content

Commit

Permalink
fix: resolved delete button invisible issue #2164
Browse files Browse the repository at this point in the history
  • Loading branch information
YadhunandanGowda authored and diehbria committed Dec 5, 2023
1 parent 149ec60 commit 3ec8743
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
14 changes: 14 additions & 0 deletions packages/dashboard/src/components/widgets/tile/tile.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,17 @@
width: 100%;
height: 2px;
}

.widget-tile-header {
overflow: hidden;
}

.widget-tile-header h1 {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}

.tile-button-contianer {
display: flex;
}
13 changes: 7 additions & 6 deletions packages/dashboard/src/components/widgets/tile/tile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React, { PropsWithChildren, useState } from 'react';
import { useDispatch, useSelector } from 'react-redux';

import Box from '@cloudscape-design/components/box';
import SpaceBetween from '@cloudscape-design/components/space-between';
import Button from '@cloudscape-design/components/button';
import {
colorBorderDividerDefault,
Expand Down Expand Up @@ -100,10 +99,12 @@ const WidgetTile: React.FC<WidgetTileProps> = ({ children, widget, title, remove
borderBottom: `2px solid ${colorBorderDividerDefault}`,
}}
>
<Box variant='h1' fontSize='body-m'>
{title}
</Box>
<SpaceBetween size='s' direction='horizontal'>
<div className='widget-tile-header' title={title}>
<Box variant='h1' fontSize='body-m'>
{title}
</Box>
</div>
<div className='tile-button-contianer'>
{iotSiteWiseClient && widget.type !== 'text' && (
<CSVDownloadButton
client={iotSiteWiseClient}
Expand Down Expand Up @@ -132,7 +133,7 @@ const WidgetTile: React.FC<WidgetTileProps> = ({ children, widget, title, remove
handleCancel={handleCloseModal}
handleSubmit={handleSubmit}
/>
</SpaceBetween>
</div>
</div>
)}
<div className='widget-tile-body'>{children}</div>
Expand Down

0 comments on commit 3ec8743

Please sign in to comment.