Changes based on latest feedback
Signed-off-by: Andre Wanlin <67169551+awanlin@users.noreply.github.com>
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-org': patch
|
||||
---
|
||||
|
||||
Removed themed example from `OwnershipCard` Storybook entry
|
||||
@@ -112,6 +112,42 @@ export interface BackstageThemeOptions extends ThemeOptions_3 {
|
||||
palette: BackstagePaletteOptions;
|
||||
}
|
||||
|
||||
// @public
|
||||
export type BackstageTypography = {
|
||||
htmlFontSize: number;
|
||||
fontFamily: string;
|
||||
h1: {
|
||||
fontSize: number;
|
||||
fontWeight: number;
|
||||
marginBottom: number;
|
||||
};
|
||||
h2: {
|
||||
fontSize: number;
|
||||
fontWeight: number;
|
||||
marginBottom: number;
|
||||
};
|
||||
h3: {
|
||||
fontSize: number;
|
||||
fontWeight: number;
|
||||
marginBottom: number;
|
||||
};
|
||||
h4: {
|
||||
fontSize: number;
|
||||
fontWeight: number;
|
||||
marginBottom: number;
|
||||
};
|
||||
h5: {
|
||||
fontSize: number;
|
||||
fontWeight: number;
|
||||
marginBottom: number;
|
||||
};
|
||||
h6: {
|
||||
fontSize: number;
|
||||
fontWeight: number;
|
||||
marginBottom: number;
|
||||
};
|
||||
};
|
||||
|
||||
// @public
|
||||
export interface BaseThemeOptionsInput<PaletteOptions> {
|
||||
// (undocumented)
|
||||
@@ -125,7 +161,7 @@ export interface BaseThemeOptionsInput<PaletteOptions> {
|
||||
// (undocumented)
|
||||
palette: PaletteOptions;
|
||||
// (undocumented)
|
||||
typography?: Typography;
|
||||
typography?: BackstageTypography;
|
||||
}
|
||||
|
||||
// @public
|
||||
@@ -136,7 +172,7 @@ export function createBaseThemeOptions<PaletteOptions>(
|
||||
options: BaseThemeOptionsInput<PaletteOptions>,
|
||||
): {
|
||||
palette: PaletteOptions;
|
||||
typography: Typography;
|
||||
typography: BackstageTypography;
|
||||
page: PageTheme;
|
||||
getPageTheme: ({ themeId }: PageThemeSelector) => PageTheme;
|
||||
};
|
||||
@@ -348,7 +384,7 @@ export type SimpleThemeOptions = {
|
||||
pageTheme?: Record<string, PageTheme>;
|
||||
fontFamily?: string;
|
||||
htmlFontSize?: number;
|
||||
typography?: Typography;
|
||||
typography?: BackstageTypography;
|
||||
};
|
||||
|
||||
// @public
|
||||
@@ -372,42 +408,6 @@ export function transformV5ComponentThemesToV4(
|
||||
props: ComponentsProps;
|
||||
};
|
||||
|
||||
// @public
|
||||
export type Typography = {
|
||||
htmlFontSize: number;
|
||||
fontFamily: string;
|
||||
h1: {
|
||||
fontSize: number;
|
||||
fontWeight: number;
|
||||
marginBottom: number;
|
||||
};
|
||||
h2: {
|
||||
fontSize: number;
|
||||
fontWeight: number;
|
||||
marginBottom: number;
|
||||
};
|
||||
h3: {
|
||||
fontSize: number;
|
||||
fontWeight: number;
|
||||
marginBottom: number;
|
||||
};
|
||||
h4: {
|
||||
fontSize: number;
|
||||
fontWeight: number;
|
||||
marginBottom: number;
|
||||
};
|
||||
h5: {
|
||||
fontSize: number;
|
||||
fontWeight: number;
|
||||
marginBottom: number;
|
||||
};
|
||||
h6: {
|
||||
fontSize: number;
|
||||
fontWeight: number;
|
||||
marginBottom: number;
|
||||
};
|
||||
};
|
||||
|
||||
// @public
|
||||
export interface UnifiedTheme {
|
||||
// (undocumented)
|
||||
@@ -429,7 +429,7 @@ export interface UnifiedThemeOptions {
|
||||
// (undocumented)
|
||||
palette: PaletteOptions & PaletteOptions_2;
|
||||
// (undocumented)
|
||||
typography?: Typography;
|
||||
typography?: BackstageTypography;
|
||||
}
|
||||
|
||||
// @public
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Typography, PageTheme, PageThemeSelector } from './types';
|
||||
import { BackstageTypography, PageTheme, PageThemeSelector } from './types';
|
||||
import { pageTheme as defaultPageThemes } from './pageTheme';
|
||||
|
||||
const DEFAULT_HTML_FONT_SIZE = 16;
|
||||
@@ -33,7 +33,7 @@ export interface BaseThemeOptionsInput<PaletteOptions> {
|
||||
pageTheme?: Record<string, PageTheme>;
|
||||
fontFamily?: string;
|
||||
htmlFontSize?: number;
|
||||
typography?: Typography;
|
||||
typography?: BackstageTypography;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -23,5 +23,5 @@ export type {
|
||||
BackstagePaletteAdditions,
|
||||
PageTheme,
|
||||
PageThemeSelector,
|
||||
Typography,
|
||||
BackstageTypography,
|
||||
} from './types';
|
||||
|
||||
@@ -120,7 +120,7 @@ export type BackstageThemeAdditions = {
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export type Typography = {
|
||||
export type BackstageTypography = {
|
||||
htmlFontSize: number;
|
||||
fontFamily: string;
|
||||
h1: {
|
||||
|
||||
@@ -29,7 +29,7 @@ import {
|
||||
createTheme as createV5Theme,
|
||||
} from '@mui/material/styles';
|
||||
import { createBaseThemeOptions } from '../base/createBaseThemeOptions';
|
||||
import { Typography, PageTheme } from '../base/types';
|
||||
import { BackstageTypography, PageTheme } from '../base/types';
|
||||
import { defaultComponentThemes } from '../v5';
|
||||
import { transformV5ComponentThemesToV4 } from './overrides';
|
||||
import { SupportedThemes, SupportedVersions, UnifiedTheme } from './types';
|
||||
@@ -64,7 +64,7 @@ export interface UnifiedThemeOptions {
|
||||
fontFamily?: string;
|
||||
htmlFontSize?: number;
|
||||
components?: ThemeOptionsV5['components'];
|
||||
typography?: Typography;
|
||||
typography?: BackstageTypography;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -25,7 +25,7 @@ import type {
|
||||
import {
|
||||
BackstagePaletteAdditions,
|
||||
BackstageThemeAdditions,
|
||||
Typography,
|
||||
BackstageTypography,
|
||||
PageTheme,
|
||||
PageThemeSelector,
|
||||
} from '../base/types';
|
||||
@@ -90,7 +90,7 @@ export type SimpleThemeOptions = {
|
||||
pageTheme?: Record<string, PageTheme>;
|
||||
fontFamily?: string;
|
||||
htmlFontSize?: number;
|
||||
typography?: Typography;
|
||||
typography?: BackstageTypography;
|
||||
};
|
||||
|
||||
declare module '@material-ui/core/styles/createPalette' {
|
||||
|
||||
Reference in New Issue
Block a user