Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions flow-typed/npm/@box/blueprint-web-assets_vx.x.x.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ declare module '@box/blueprint-web-assets/icons/Fill' {
declare export var Ellipsis: React$ComponentType<any>;
declare export var PointerChevronLeft: React$ComponentType<any>;
declare export var ArrowsExpand: React$ComponentType<any>;
declare export var InfoBadge: React$ComponentType<any>;
}

declare module '@box/blueprint-web-assets/icons/Logo' {
Expand Down
2 changes: 0 additions & 2 deletions i18n/en-US.properties
Original file line number Diff line number Diff line change
Expand Up @@ -974,8 +974,6 @@ boxui.base.previousMonth = Previous Month
boxui.breadcrumb.breadcrumbLabel = Breadcrumb
# Button label for the "more" dropdown menu
boxui.categorySelector.label.more = More
# Icon to display more information on the checkbox
boxui.checkboxTooltip.iconInfoText = Info
# Button to add classification on an item
boxui.classification.add = Add
# Title of the card that shows the reason why the AI classification was applied when no date is available.
Expand Down
9 changes: 0 additions & 9 deletions src/components/checkbox/Checkbox.scss
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,7 @@
line-height: 0.1; // This keeps the tooltip wrapper height consistent with the child element

> .info-tooltip {
position: relative;
display: inline-block;
flex: none;
width: 16px;
height: 16px;
margin-left: 5px;

> svg path {
fill: $primary-color;
}
}
}

Expand Down
26 changes: 9 additions & 17 deletions src/components/checkbox/CheckboxTooltip.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
import * as React from 'react';
import { defineMessages, FormattedMessage } from 'react-intl';

import { Focusable, Tooltip, TooltipProvider } from '@box/blueprint-web';
import { InfoBadge } from '@box/blueprint-web-assets/icons/Fill';
Comment thread
kduncanhsu marked this conversation as resolved.

import IconInfo from '../../icons/general/IconInfo';

const messages = defineMessages({
checkboxTooltipIconInfoText: {
defaultMessage: 'Info',
description: 'Icon to display more information on the checkbox',
id: 'boxui.checkboxTooltip.iconInfoText',
},
});
import { bdlBoxBlue } from '../../styles/variables';

export interface CheckboxTooltipProps {
tooltip: string;
Expand All @@ -22,13 +14,13 @@ const CheckboxTooltip = ({ tooltip }: CheckboxTooltipProps) => (
<TooltipProvider>
<Tooltip content={tooltip}>
<Focusable>
<div className="info-tooltip">
<IconInfo
height={16}
title={<FormattedMessage {...messages.checkboxTooltipIconInfoText} />}
width={16}
/>
</div>
<InfoBadge
aria-label={tooltip}
color={bdlBoxBlue}
className="info-tooltip"
height={16}
width={16}
/>
</Focusable>
</Tooltip>
</TooltipProvider>
Expand Down
Loading