1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-24 15:59:41 +02:00

fix(teasers): updated muted styles from qa feedback [EE-6035] (#10390)

* fix(teasers): updated muted styles from qa feedback [EE-6035]
This commit is contained in:
Ali 2023-09-28 11:32:58 +01:00 committed by GitHub
parent 99625cd35f
commit d678b155ba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 290 additions and 303 deletions

View file

@ -57,7 +57,13 @@ export function BoxSelectorItem<T extends Value>({
type={type}
checkIcon={checkIcon}
>
{limitedToBE && <LimitedToBeBoxSelectorIndicator url={featureUrl} />}
{limitedToBE && (
<LimitedToBeBoxSelectorIndicator
url={featureUrl}
// show tooltip only for radio type options because be-only checkbox options can't be selected
showTooltip={type === 'radio'}
/>
)}
<div
className={clsx('flex min-w-[140px] gap-2', {
'opacity-30': limitedToBE,

View file

@ -5,9 +5,13 @@ import { Tooltip } from '@@/Tip/Tooltip';
interface Props {
url?: string;
showTooltip?: boolean;
}
export function LimitedToBeBoxSelectorIndicator({ url }: Props) {
export function LimitedToBeBoxSelectorIndicator({
url,
showTooltip = true,
}: Props) {
return (
<div className="absolute left-0 top-0 w-full">
<div className="mx-auto flex max-w-fit items-center rounded-b-lg border border-t-0 border-solid border-gray-6 bg-transparent px-3 py-1 text-gray-6">
@ -20,10 +24,12 @@ export function LimitedToBeBoxSelectorIndicator({ url }: Props) {
<Icon icon={Briefcase} className="!mr-1" />
<span>Business Feature</span>
</a>
<Tooltip
size="sm"
message="Select this option to preview this business feature."
/>
{showTooltip && (
<Tooltip
size="sm"
message="Select this option to preview this business feature."
/>
)}
</div>
</div>
);