Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F99616326
createMixins.d.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Jan 25, 19:21
Size
1 KB
Mime Type
text/x-java
Expires
Mon, Jan 27, 19:21 (2 d)
Engine
blob
Format
Raw Data
Handle
23831422
Attached To
rOACCT Open Access Compliance Check Tool (OACCT)
createMixins.d.ts
View Options
import * as CSS from 'csstype';
import { Breakpoints } from '@mui/system';
export type NormalCssProperties = CSS.Properties<number | string>;
export type Fontface = CSS.AtRule.FontFace & { fallbacks?: CSS.AtRule.FontFace[] };
/**
* Allows the user to augment the properties available
*/
export interface BaseCSSProperties extends NormalCssProperties {
'@font-face'?: Fontface | Fontface[];
}
export interface CSSProperties extends BaseCSSProperties {
// Allow pseudo selectors and media queries
// `unknown` is used since TS does not allow assigning an interface without
// an index signature to one with an index signature. This is to allow type safe
// module augmentation.
// Technically we want any key not typed in `BaseCSSProperties` to be of type
// `CSSProperties` but this doesn't work. The index signature needs to cover
// BaseCSSProperties as well. Usually you would use `BaseCSSProperties[keyof BaseCSSProperties]`
// but this would not allow assigning React.CSSProperties to CSSProperties
[k: string]: unknown | CSSProperties;
}
export interface Mixins {
toolbar: CSSProperties;
// ... use interface declaration merging to add custom mixins
}
export interface MixinsOptions extends Partial<Mixins> {
// ... use interface declaration merging to add custom mixin options
}
export default function createMixins(breakpoints: Breakpoints, mixins: MixinsOptions): Mixins;
Event Timeline
Log In to Comment