Skip to content

Commit

Permalink
Merge pull request #7272 from meeseeksmachine/auto-backport-of-pr-726…
Browse files Browse the repository at this point in the history
…6-on-1.x

Backport PR #7266 on branch 1.x (removed svg styling from old icon behavior fallback)
  • Loading branch information
jasongrout committed Oct 2, 2019
2 parents 56c4401 + 255adb7 commit dbc4368
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 17 deletions.
18 changes: 2 additions & 16 deletions packages/ui-components/src/icon/iconregistry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,7 @@ export class IconRegistry implements IIconRegistry {
if (fallback) {
if (container) {
container.textContent = title || '';
container.className = classes(
name,
className,
propsStyle ? iconStyleFlat(propsStyle) : ''
);
container.className = classes(name, className);
return container;
} else {
// the non-container fallback isn't implemented
Expand Down Expand Up @@ -146,17 +142,7 @@ export class IconRegistry implements IIconRegistry {
if (!resolvedName) {
// TODO: remove fallback in jlab 2.0
if (fallback) {
return (
<Tag
className={classes(
name,
className,
propsStyle ? iconStyleFlat(propsStyle) : ''
)}
>
{title || ''}
</Tag>
);
return <Tag className={classes(name, className)}>{title || ''}</Tag>;
}

// bail if failing silently
Expand Down
8 changes: 7 additions & 1 deletion packages/ui-components/src/style/icon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,12 @@ const containerCSSTabManager: NestedCSSProperties = {
position: 'relative'
};

const containerCSSToolbarButton: NestedCSSProperties = {
display: 'inline-block',
margin: 'auto',
verticalAlign: 'middle'
};

const containerCSSKind: { [k in IconKindType]: NestedCSSProperties } = {
breadCrumb: {},
dockPanelBar: containerCSSDockPanelBar,
Expand All @@ -231,7 +237,7 @@ const containerCSSKind: { [k in IconKindType]: NestedCSSProperties } = {
splash: containerCSSSplash,
statusBar: {},
tabManager: containerCSSTabManager,
toolbarButton: {},
toolbarButton: containerCSSToolbarButton,
unset: {}
};

Expand Down

0 comments on commit dbc4368

Please sign in to comment.