mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-25 00:07:47 +01:00
fix: remove tooltips
This commit is contained in:
parent
aae8c4d9d9
commit
b0ba4f3a9d
@ -44,7 +44,6 @@ export const AvailableAddons = ({
|
||||
onClick={() =>
|
||||
history.push(`/addons/create/${provider.name}`)
|
||||
}
|
||||
tooltip={`Configure ${provider.name} Addon`}
|
||||
>
|
||||
Configure
|
||||
</PermissionButton>
|
||||
|
@ -122,7 +122,6 @@ export const ConfiguredAddons = ({ getAddonIcon }: IConfigureAddonsProps) => {
|
||||
</PermissionIconButton>
|
||||
<PermissionIconButton
|
||||
permission={UPDATE_ADDON}
|
||||
tooltip={'Edit Addon'}
|
||||
onClick={() => {
|
||||
history.push(`/addons/edit/${addon.id}`);
|
||||
}}
|
||||
@ -131,7 +130,6 @@ export const ConfiguredAddons = ({ getAddonIcon }: IConfigureAddonsProps) => {
|
||||
</PermissionIconButton>
|
||||
<PermissionIconButton
|
||||
permission={DELETE_ADDON}
|
||||
tooltip={'Remove Addon'}
|
||||
onClick={() => {
|
||||
setDeletedAddon(addon);
|
||||
setShowDelete(true);
|
||||
|
@ -50,7 +50,6 @@ const RoleListItem = ({
|
||||
<PermissionIconButton
|
||||
data-loading
|
||||
aria-label="Edit"
|
||||
tooltip="Edit"
|
||||
disabled={type === BUILTIN_ROLE_TYPE}
|
||||
onClick={() => {
|
||||
history.push(`/admin/roles/${id}/edit`);
|
||||
@ -62,7 +61,6 @@ const RoleListItem = ({
|
||||
<PermissionIconButton
|
||||
data-loading
|
||||
aria-label="Remove role"
|
||||
tooltip="Remove role"
|
||||
disabled={type === BUILTIN_ROLE_TYPE}
|
||||
onClick={() => {
|
||||
setCurrentRole({ id, name, description });
|
||||
|
@ -52,7 +52,6 @@ const Constraint = ({
|
||||
<div className={styles.btnContainer}>
|
||||
<PermissionIconButton
|
||||
onClick={editCallback}
|
||||
tooltip="Edit strategy"
|
||||
permission={UPDATE_FEATURE}
|
||||
projectId={projectId}
|
||||
>
|
||||
@ -61,7 +60,6 @@ const Constraint = ({
|
||||
|
||||
<PermissionIconButton
|
||||
onClick={deleteCallback}
|
||||
tooltip="Delete strategy"
|
||||
permission={UPDATE_FEATURE}
|
||||
projectId={projectId}
|
||||
>
|
||||
|
@ -16,7 +16,7 @@ export interface IPermissionIconButtonProps
|
||||
|
||||
const PermissionButton: React.FC<IPermissionIconButtonProps> = ({
|
||||
permission,
|
||||
tooltip = 'Click to perform action',
|
||||
tooltip,
|
||||
onClick,
|
||||
children,
|
||||
disabled,
|
||||
@ -54,9 +54,9 @@ const PermissionButton: React.FC<IPermissionIconButtonProps> = ({
|
||||
|
||||
access = handleAccess();
|
||||
|
||||
const tooltipText = access
|
||||
? tooltip
|
||||
: "You don't have access to perform this operation";
|
||||
const tooltipText = !access
|
||||
? "You don't have access to perform this operation"
|
||||
: '';
|
||||
|
||||
return (
|
||||
<Tooltip title={tooltipText} arrow>
|
||||
|
@ -39,9 +39,9 @@ const PermissionIconButton: React.FC<IPermissionIconButtonProps> = ({
|
||||
access = hasAccess(permission);
|
||||
}
|
||||
|
||||
const tooltipText = access
|
||||
? tooltip || ''
|
||||
: "You don't have access to perform this operation";
|
||||
const tooltipText = !access
|
||||
? "You don't have access to perform this operation"
|
||||
: '';
|
||||
|
||||
return (
|
||||
<Tooltip title={tooltipText} arrow>
|
||||
|
@ -19,7 +19,7 @@ const PermissionSwitch = React.forwardRef<
|
||||
>((props, ref) => {
|
||||
const {
|
||||
permission,
|
||||
tooltip = '',
|
||||
tooltip,
|
||||
disabled,
|
||||
projectId,
|
||||
environmentId,
|
||||
@ -39,9 +39,9 @@ const PermissionSwitch = React.forwardRef<
|
||||
access = hasAccess(permission);
|
||||
}
|
||||
|
||||
const tooltipText = access
|
||||
? tooltip
|
||||
: "You don't have access to perform this operation";
|
||||
const tooltipText = !access
|
||||
? "You don't have access to perform this operation"
|
||||
: '';
|
||||
|
||||
return (
|
||||
<Tooltip title={tooltipText} arrow>
|
||||
|
@ -172,7 +172,6 @@ const EnvironmentList = () => {
|
||||
<ResponsiveButton
|
||||
onClick={navigateToCreateEnvironment}
|
||||
maxWidth="700px"
|
||||
tooltip="Add new environment"
|
||||
Icon={Add}
|
||||
>
|
||||
New Environment
|
||||
|
@ -93,7 +93,6 @@ const FeatureOverviewEnvSwitch = ({
|
||||
checked={env.enabled}
|
||||
onChange={toggleEnvironment}
|
||||
environmentId={env.name}
|
||||
tooltip={''}
|
||||
/>
|
||||
{content}
|
||||
</div>
|
||||
|
@ -101,7 +101,6 @@ const FeatureSettingsProject = () => {
|
||||
show={
|
||||
<PermissionButton
|
||||
permission={MOVE_FEATURE_TOGGLE}
|
||||
tooltip="Update feature"
|
||||
onClick={() => setShowConfirmDialog(true)}
|
||||
projectId={projectId}
|
||||
>
|
||||
|
@ -125,7 +125,6 @@ const Project = () => {
|
||||
<div className={styles.titleText}>{project?.name}</div>
|
||||
<PermissionIconButton
|
||||
permission={UPDATE_PROJECT}
|
||||
tooltip="Edit"
|
||||
projectId={project?.id}
|
||||
onClick={() => history.push(`/projects/${id}/edit`)}
|
||||
data-loading
|
||||
|
@ -66,7 +66,6 @@ const ProjectFeatureToggles = ({
|
||||
)
|
||||
}
|
||||
maxWidth="700px"
|
||||
tooltip="New feature toggle"
|
||||
Icon={Add}
|
||||
projectId={id}
|
||||
permission={CREATE_FEATURE}
|
||||
|
@ -50,7 +50,6 @@ const ProjectInfo = ({
|
||||
const permissionButton = (
|
||||
<PermissionIconButton
|
||||
permission={UPDATE_PROJECT}
|
||||
tooltip={'Edit description'}
|
||||
projectId={id}
|
||||
component={Link}
|
||||
className={permissionButtonClass}
|
||||
|
@ -67,7 +67,6 @@ export const StrategiesList = () => {
|
||||
data-test={ADD_NEW_STRATEGY_ID}
|
||||
onClick={() => history.push('/strategies/create')}
|
||||
permission={CREATE_STRATEGY}
|
||||
tooltip={'Add new strategy'}
|
||||
>
|
||||
<Add />
|
||||
</PermissionIconButton>
|
||||
@ -78,7 +77,6 @@ export const StrategiesList = () => {
|
||||
color="primary"
|
||||
permission={CREATE_STRATEGY}
|
||||
data-test={ADD_NEW_STRATEGY_ID}
|
||||
tooltip={'Add new strategy'}
|
||||
>
|
||||
New strategy
|
||||
</PermissionButton>
|
||||
@ -163,7 +161,6 @@ export const StrategiesList = () => {
|
||||
<PermissionIconButton
|
||||
onClick={() => onReactivateStrategy(strategy)}
|
||||
permission={UPDATE_STRATEGY}
|
||||
tooltip={'Reactivate activation strategy'}
|
||||
>
|
||||
<VisibilityOff />
|
||||
</PermissionIconButton>
|
||||
@ -203,7 +200,6 @@ export const StrategiesList = () => {
|
||||
<PermissionIconButton
|
||||
onClick={() => onDeleteStrategy(strategy)}
|
||||
permission={DELETE_STRATEGY}
|
||||
tooltip={'Delete strategy'}
|
||||
>
|
||||
<Delete />
|
||||
</PermissionIconButton>
|
||||
|
Loading…
Reference in New Issue
Block a user