Skip to content

Commit

Permalink
Don't make the toolbar stands out of its parent (#126)
Browse files Browse the repository at this point in the history
Co-authored-by: Frédéric Collonval <[email protected]>
  • Loading branch information
fcollonval and fcollonval authored Aug 10, 2024
1 parent 25893a5 commit 1eed1b9
Showing 1 changed file with 1 addition and 20 deletions.
21 changes: 1 addition & 20 deletions packages/components/src/toolbar/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import {
StartEnd,
StartEndOptions,
applyMixins,
composedParent,
getDirection,
toolbarTemplate as template
} from '@microsoft/fast-foundation';
Expand All @@ -26,8 +25,6 @@ import {
limit
} from '@microsoft/fast-web-utilities';
import { isFocusable } from 'tabbable';
import { Swatch } from '../color/swatch.js';
import { fillColor, neutralFillLayerRecipe } from '../design-tokens.js';
import { toolbarStyles as styles } from './toolbar.styles.js';

/**
Expand Down Expand Up @@ -394,23 +391,7 @@ applyMixins(FoundationToolbar, StartEnd, DelegatesARIAToolbar);
* @public
* @tagname jp-toolbar
*/
export class Toolbar extends FoundationToolbar {
connectedCallback() {
super.connectedCallback();

const parent = composedParent(this);

if (parent) {
fillColor.setValueFor(
this,
(target: HTMLElement): Swatch =>
neutralFillLayerRecipe
.getValueFor(target)
.evaluate(target, fillColor.getValueFor(parent))
);
}
}
}
export class Toolbar extends FoundationToolbar {}

/**
* A function that returns a {@link @microsoft/fast-foundation#Toolbar} registration for configuring the component with a DesignSystem.
Expand Down

0 comments on commit 1eed1b9

Please sign in to comment.