Storybook: Fixes theming of the padded story (that makes stories use primary background by default) (#33166)

This commit is contained in:
Torkel Ödegaard
2021-04-21 09:45:12 +02:00
committed by GitHub
parent bad048b7ba
commit dc6d134276
8 changed files with 59 additions and 92 deletions

View File

@@ -1,6 +1,6 @@
import React, { MouseEvent, useContext } from 'react';
import React, { MouseEvent } from 'react';
import { css } from '@emotion/css';
import { CallToActionCard, Icon, IconName, LinkButton, ThemeContext } from '@grafana/ui';
import { CallToActionCard, Icon, IconName, LinkButton } from '@grafana/ui';
import { selectors } from '@grafana/e2e-selectors';
export interface Props {
@@ -39,8 +39,6 @@ const EmptyListCTA: React.FunctionComponent<Props> = ({
infoBox,
infoBoxTitle,
}) => {
const theme = useContext(ThemeContext);
const footer = () => {
return (
<>
@@ -86,15 +84,7 @@ const EmptyListCTA: React.FunctionComponent<Props> = ({
</LinkButton>
);
return (
<CallToActionCard
className={ctaStyle}
message={title}
footer={footer()}
callToActionElement={ctaElement}
theme={theme}
/>
);
return <CallToActionCard className={ctaStyle} message={title} footer={footer()} callToActionElement={ctaElement} />;
};
export default EmptyListCTA;

View File

@@ -35,12 +35,6 @@ export const NoDataSourceCallToAction = () => {
`;
return (
<CallToActionCard
callToActionElement={ctaElement}
className={cardClassName}
footer={footer}
message={message}
theme={theme}
/>
<CallToActionCard callToActionElement={ctaElement} className={cardClassName} footer={footer} message={message} />
);
};