redux-devtools/packages/redux-devtools-ui/src/themes/default.ts
Nathan Bierema bbb1a40395
Convert React packages to ESM (#1650)
* react-base16-styling

* Use inline react-base16-styling themes

* Fix

* Format

* Fix

* Fixes

* Transform more

* react-json-tree

* Update lock

* Remove unnecessary

* react-dock

* Move to dep

* Lock

* Fix

* Fix

* Create tame-eagles-relax.md
2024-04-07 21:04:45 +00:00

35 lines
1.1 KiB
TypeScript

import type { Base16Theme } from 'react-base16-styling';
import * as CSS from 'csstype';
import * as themes from './index';
export interface Theme extends Base16Theme {
fontFamily: CSS.Property.FontFamily;
codeFontFamily: CSS.Property.FontFamily;
inputHeight: number;
inputBorderWidth: number;
inputBorderRadius: number;
spinnerSize: number;
inputPadding: number;
selectArrowWidth: number;
inputInternalHeight: number;
inputBorderColor: string;
inputFocusedStyle: string;
type?: keyof typeof themes;
light?: boolean;
}
export default (colors: Base16Theme) => ({
...colors,
fontFamily: "'Source Sans Pro', sans-serif",
codeFontFamily: "'Source Code Pro', monospace",
inputHeight: 30,
inputBorderWidth: 1,
inputBorderRadius: 4,
spinnerSize: 13, // Math.floor(theme.inputHeight / 2) - 2
inputPadding: 10, // theme.inputHeight / 3
selectArrowWidth: 4, // Math.floor(theme.inputHeight / 7)
inputInternalHeight: 28, // theme.inputHeight - theme.inputBorderWidth * 2
inputBorderColor: colors.base02,
inputFocusedStyle: `border-color: ${colors.base0D}`,
});