Skip to content

Commit 3ed7642

Browse files
committed
styles(tooltip): refactor styles
1 parent cd6ba6d commit 3ed7642

File tree

5 files changed

+14
-5
lines changed

5 files changed

+14
-5
lines changed

src/components/tooltip/themes/shared/tooltip.common.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ $color-border: rem(4px) solid var-get($theme, 'background');
99
background: var-get($theme, 'background');
1010
color: var-get($theme, 'text-color');
1111
border-radius: var-get($theme, 'border-radius');
12+
box-shadow: var-get($theme, 'elevation');
1213
}
1314

1415
#arrow {
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
@use 'styles/utilities' as *;
2+
3+
[part="base"] {
4+
font-size: rem(12px);
5+
}

src/components/tooltip/themes/themes.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
import { css } from 'lit';
22

33
import type { Themes } from '../../../theming/types.js';
4-
import { styles as bootstrapDark } from './dark/tooltip.bootstrap.css.js';
4+
import { styles as indigo } from './shared/tooltip.indigo.css.js';
5+
56
// Dark Overrides
7+
import { styles as bootstrapDark } from './dark/tooltip.bootstrap.css.js';
68
import { styles as fluentDark } from './dark/tooltip.fluent.css.js';
79
import { styles as indigoDark } from './dark/tooltip.indigo.css.js';
810
import { styles as materialDark } from './dark/tooltip.material.css.js';
@@ -27,7 +29,7 @@ const light = {
2729
${fluentLight}
2830
`,
2931
indigo: css`
30-
${indigoLight}
32+
${indigo} ${indigoLight}
3133
`,
3234
};
3335

@@ -45,7 +47,7 @@ const dark = {
4547
${fluentDark}
4648
`,
4749
indigo: css`
48-
${indigoDark}
50+
${indigo} ${indigoDark}
4951
`,
5052
};
5153

src/components/tooltip/themes/tooltip.base.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@
1111
[part="base"] {
1212
@include type-style('body-2');
1313

14-
padding: rem(3px) rem(8px);
14+
padding: rem(4px) rem(8px);
1515
font-size: rem(10px);
1616
font-weight: 600;
17+
line-height: rem(16px);
1718
text-align: start;
1819
max-width: 200px;
1920
display: flex;

stories/tooltip.stories.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ export const SharedTooltipMultipleAnchors: Story = {
556556
>
557557
</div>
558558
559-
<igc-tooltip anchor="first" id="sharedTooltip" placement="top">
559+
<igc-tooltip anchor="first" sticky id="sharedTooltip" placement="top">
560560
This is a shared tooltip!
561561
</igc-tooltip>
562562
`;

0 commit comments

Comments
 (0)