Skip to content

Commit

Permalink
Fix style
Browse files Browse the repository at this point in the history
  • Loading branch information
betodealmeida committed Jun 29, 2023
1 parent 41831c4 commit fb43237
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
15 changes: 11 additions & 4 deletions superset-frontend/src/components/ReportModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,14 @@ import {
NOTIFICATION_FORMATS,
} from 'src/reports/types';
import { reportSelector } from 'src/views/CRUD/hooks';
import { TRANSLATIONS } from 'src/features/alerts/AlertReportModal';
import {
TRANSLATIONS,
StyledInputContainer,
} from 'src/features/alerts/AlertReportModal';
import { CreationMethod } from './HeaderReportDropdown';
import {
antDErrorAlertStyles,
CustomWidthHeaderStyle,
StyledModal,
StyledTopSection,
StyledBottomSection,
Expand Down Expand Up @@ -260,8 +264,11 @@ function ReportModal({
</>
);
const renderCustomWidthSection = (
<div>
<div className="control-label">
<StyledInputContainer>
<div
className="control-label"
css={(theme: SupersetTheme) => CustomWidthHeaderStyle(theme)}
>
{TRANSLATIONS.CUSTOM_SCREENSHOT_WIDTH_TEXT}
</div>
<div className="input-container">
Expand All @@ -277,7 +284,7 @@ function ReportModal({
}}
/>
</div>
</div>
</StyledInputContainer>
);

return (
Expand Down
4 changes: 4 additions & 0 deletions superset-frontend/src/components/ReportModal/styles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ export const TimezoneHeaderStyle = (theme: SupersetTheme) => css`
margin: ${theme.gridUnit * 3}px 0 ${theme.gridUnit * 2}px;
`;

export const CustomWidthHeaderStyle = (theme: SupersetTheme) => css`
margin: ${theme.gridUnit * 3}px 0 ${theme.gridUnit * 2}px;
`;

export const SectionHeaderStyle = (theme: SupersetTheme) => css`
margin: ${theme.gridUnit * 3}px 0;
`;
Expand Down
6 changes: 5 additions & 1 deletion superset-frontend/src/features/alerts/AlertReportModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ import Owner from 'src/types/Owner';
import { AntdCheckbox, AsyncSelect, Select } from 'src/components';
import TextAreaControl from 'src/explore/components/controls/TextAreaControl';
import { useCommonConf } from 'src/features/databases/state';
import { CustomWidthHeaderStyle } from 'src/components/ReportModal/styles';
import { InfoTooltipWithTrigger } from '@superset-ui/chart-controls';
import {
NotificationMethodOption,
Expand Down Expand Up @@ -1487,7 +1488,10 @@ const AlertReportModal: FunctionComponent<AlertReportModalProps> = ({
)}
{isScreenshot && (
<StyledInputContainer>
<div className="control-label">
<div
className="control-label"
css={(theme: SupersetTheme) => CustomWidthHeaderStyle(theme)}
>
{TRANSLATIONS.CUSTOM_SCREENSHOT_WIDTH_TEXT}
</div>
<div className="input-container">
Expand Down

0 comments on commit fb43237

Please sign in to comment.