Skip to content

Commit cadab1d

Browse files
authored
feat(aci-toggle): add separate prop for description (#3307)
* feat(aci-toggle): add separate prop for description * feat(aci-toggle): resolve comments
1 parent 32c656d commit cadab1d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/features/advanced-content-insights/AdvancedContentInsightsToggle.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,15 @@ import messages from './messages';
1111
import './AdvancedContentInsightsToggle.scss';
1212

1313
interface Props {
14+
hasDescription?: boolean;
1415
hasTooltip?: boolean;
1516
isChecked?: boolean;
1617
isDisabled: boolean;
1718
onChange?: (isEnabled: boolean) => void;
1819
}
1920

2021
const AdvancedContentInsightsToggle = ({
22+
hasDescription,
2123
hasTooltip = true,
2224
isChecked = false,
2325
isDisabled,
@@ -45,7 +47,7 @@ const AdvancedContentInsightsToggle = ({
4547
<Toggle
4648
className="AdvancedContentInsightsToggle"
4749
data-testid="insights-toggle"
48-
description={!hasTooltip && !isChecked && description}
50+
description={!hasTooltip && hasDescription && description}
4951
isDisabled={isDisabled}
5052
isOn={isChecked}
5153
label={label}

0 commit comments

Comments
 (0)