Skip to content

Commit e69f25a

Browse files
committed
Fix type error and adhoc filter alignment
1 parent 8907f77 commit e69f25a

File tree

7 files changed

+26
-20
lines changed

7 files changed

+26
-20
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@
147147
"@types/papaparse": "5.3.7",
148148
"@types/pluralize": "^0.0.29",
149149
"@types/prismjs": "1.26.0",
150-
"@types/react": "^18.2.28",
150+
"@types/react": "18.2.28",
151151
"@types/react-beautiful-dnd": "13.1.3",
152152
"@types/react-datepicker": "^4.19.0",
153153
"@types/react-dom": "18.2.7",

packages/grafana-ui/src/components/Icon/Icon.tsx

+3
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ export const Icon = React.forwardRef<HTMLDivElement, IconProps>(
4242

4343
/* Temporary solution to display also font awesome icons */
4444
if (name?.startsWith('fa fa-')) {
45+
{
46+
/* @ts-ignore */
47+
}
4548
return <i className={getFontAwesomeIconStyles(name, className)} {...divElementProps} style={style} />;
4649
}
4750

packages/grafana-ui/src/components/Menu/MenuItem.tsx

+12-12
Original file line numberDiff line numberDiff line change
@@ -165,16 +165,16 @@ export const MenuItem = React.memo(
165165
{label}
166166

167167
<div className={cx(styles.rightWrapper, { [styles.withShortcut]: hasShortcut })}>
168-
{
169-
hasShortcut && (
170-
<div className={styles.shortcut}>
171-
<Icon name="keyboard" aria-hidden />
172-
{shortcut}
173-
</div>
174-
)
175-
}
176-
{
177-
hasSubMenu && (
168+
{hasShortcut && (
169+
<div className={styles.shortcut}>
170+
{/* @ts-ignore */}
171+
<Icon name="keyboard" aria-hidden />
172+
{shortcut}
173+
</div>
174+
)}
175+
{hasSubMenu && (
176+
<>
177+
{/* @ts-ignore */}
178178
<SubMenu
179179
items={childItems}
180180
isOpen={isSubMenuOpen}
@@ -183,8 +183,8 @@ export const MenuItem = React.memo(
183183
close={closeSubMenu}
184184
customStyle={customSubMenuContainerStyles}
185185
/>
186-
)
187-
}
186+
</>
187+
)}
188188
</div>
189189
</>
190190
</ItemElement>

packages/grafana-ui/src/themes/mixins.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,16 @@ export function mediaUp(breakpoint: string) {
4040
return `only screen and (min-width: ${breakpoint})`;
4141
}
4242

43-
const isGrafanaTheme2 = (theme: GrafanaTheme | GrafanaTheme2): theme is GrafanaTheme2 => theme.hasOwnProperty('v1');
43+
// const isGrafanaTheme2 = (theme: GrafanaTheme | GrafanaTheme2): theme is GrafanaTheme2 => theme.hasOwnProperty('v1');
4444
export const focusCss = (theme: GrafanaTheme | GrafanaTheme2) => {
45-
const isTheme2 = isGrafanaTheme2(theme);
45+
/* const isTheme2 = isGrafanaTheme2(theme);
4646
const firstColor = isTheme2 ? theme.colors.background.canvas : theme.colors.bodyBg;
4747
const secondColor = isTheme2 ? theme.colors.primary.main : theme.colors.formFocusOutline;
48+
box-shadow: 0 0 0 2px ${firstColor}, 0 0 0px 4px ${secondColor}; */
4849

4950
return `
5051
outline: 2px dotted transparent;
5152
outline-offset: 2px;
52-
box-shadow: 0 0 0 2px ${firstColor}, 0 0 0px 4px ${secondColor};
5353
transition-property: outline, outline-offset, box-shadow;
5454
transition-duration: 0.2s;
5555
transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);`;

public/app/features/variables/pickers/PickerRenderer.tsx

+3
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ const renderWrapperStyle = css`
2525
font-size: 12px;
2626
line-height: 24px;
2727
}
28+
& span {
29+
margin-top: 2px;
30+
}
2831
`;
2932

3033
export const PickerRenderer: FunctionComponent<Props> = (props) => {

public/microfrontends/fn_dashboard/index.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@
2121

2222
<script
2323
nonce=""
24-
src="../../../public/build/runtime~fn_dashboard.b6b275367b9723579ba0.js"
24+
src="../../../public/build/runtime~fn_dashboard.559158f4ffa2521babc3.js"
2525
type="text/javascript"
2626
></script>
2727

2828
<script
2929
nonce=""
30-
src="../../../public/build/fn_dashboard.7eb8aa16a9bd67ede0fc.js"
30+
src="../../../public/build/fn_dashboard.4e992a86e1264e98dfa3.js"
3131
type="text/javascript"
3232
></script>
3333

yarn.lock

+2-2
Original file line numberDiff line numberDiff line change
@@ -11333,7 +11333,7 @@ __metadata:
1133311333
languageName: node
1133411334
linkType: hard
1133511335

11336-
"@types/react@npm:*, @types/react@npm:>=16, @types/react@npm:^18.2.28":
11336+
"@types/react@npm:*, @types/react@npm:18.2.28, @types/react@npm:>=16":
1133711337
version: 18.2.28
1133811338
resolution: "@types/react@npm:18.2.28"
1133911339
dependencies:
@@ -19833,7 +19833,7 @@ __metadata:
1983319833
"@types/papaparse": 5.3.7
1983419834
"@types/pluralize": ^0.0.29
1983519835
"@types/prismjs": 1.26.0
19836-
"@types/react": ^18.2.28
19836+
"@types/react": 18.2.28
1983719837
"@types/react-beautiful-dnd": 13.1.3
1983819838
"@types/react-datepicker": ^4.19.0
1983919839
"@types/react-dom": 18.2.7

0 commit comments

Comments
 (0)