Size handling for CounterCard long value (#2345)

Avoids overlap of counterValue text and Browse button.
![Screen Shot 2022-09-30 at 10 42 41
AM](https://user-images.githubusercontent.com/65002498/193326883-9379f6de-73c7-4fee-a5e5-0e50bd052359.png)

Co-authored-by: Jillian Inapurapu <jillii@Jillians-MBP.attlocal.net>
Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
This commit is contained in:
jinapurapu
2022-10-04 15:10:59 -07:00
committed by GitHub
parent 2fed3572b2
commit 61718a5915
4 changed files with 19 additions and 12 deletions

View File

@@ -129,7 +129,6 @@ export const IAM_PAGES = {
ACCOUNT_ADD: "/identity/account/new-account",
USER_SA_ACCOUNT_ADD: "/identity/users/new-user-sa/:userName",
/* Access */
POLICIES: "/identity/policies",
POLICY_ADD: "/identity/add-policy",
POLICIES_VIEW: "/identity/policies/*",

View File

@@ -145,10 +145,7 @@ const BucketDetails = ({ classes }: IBucketDetailsProps) => {
IAM_SCOPES.S3_DELETE_BUCKET,
IAM_SCOPES.S3_FORCE_DELETE_BUCKET,
]);
const canBrowse = hasPermission(
bucketName,
IAM_PERMISSIONS[IAM_ROLES.BUCKET_VIEWER]
);
const canBrowse = hasPermission(bucketName, [IAM_SCOPES.S3_LIST_BUCKET]);
useEffect(() => {
setActiveTab(selTab);

View File

@@ -240,6 +240,7 @@ const BasicDashboard = ({ usage }: IDashboardProps) => {
padding: 5,
height: 30,
fontSize: 14,
marginTop: 20,
}}
/>
</TooltipWrapper>

View File

@@ -78,13 +78,23 @@ const CounterCard = ({
<Tooltip title={counterValue} placement="bottom" enterDelay={500}>
<Box
sx={{
fontSize: {
xl: "55px",
lg: "50px",
md: "36px",
sm: "35px",
xs: "35px",
},
fontSize:
counterValue.toString().length >= 5
? {
xl: "50px",
lg: "45px",
md: "28px",
sm: "28px",
xs: "20px",
}
: {
xl: "55px",
lg: "50px",
md: "36px",
sm: "35px",
xs: "35px",
},
fontWeight: 600,
overflow: "hidden",
textOverflow: "ellipsis",