Size handling for CounterCard long value (#2345)
Avoids overlap of counterValue text and Browse button.  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:
@@ -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/*",
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -240,6 +240,7 @@ const BasicDashboard = ({ usage }: IDashboardProps) => {
|
||||
padding: 5,
|
||||
height: 30,
|
||||
fontSize: 14,
|
||||
marginTop: 20,
|
||||
}}
|
||||
/>
|
||||
</TooltipWrapper>
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user