Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F100942220
spacing.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
Tue, Feb 4, 04:12
Size
1 KB
Mime Type
text/x-java
Expires
Thu, Feb 6, 04:12 (1 d, 21 h)
Engine
blob
Format
Raw Data
Handle
24060770
Attached To
rOACCT Open Access Compliance Check Tool (OACCT)
spacing.d.ts
View Options
import { SimpleStyleFunction, spacing, PropsFor } from './Box';
export type SpacingValueType = string | number | null | undefined;
export type SpacingProps = PropsFor<typeof spacing>;
export function createUnarySpacing<Spacing>(theme: { spacing: Spacing }): Spacing extends number
? (abs: number | string) => number | number
: Spacing extends any[]
? <Index extends number>(abs: Index | string) => Spacing[Index] | string
: Spacing extends (...args: unknown[]) => unknown
? Spacing
: // warns in Dev
() => undefined;
export function createUnaryUnit<Spacing>(
theme: { spacing: Spacing },
themeKey: string,
defaultValue: Spacing,
propName: string,
): Spacing extends number
? (abs: SpacingValueType) => number | number
: Spacing extends any[]
? <Index extends number>(abs: Index | string) => Spacing[Index] | string
: Spacing extends (...args: unknown[]) => unknown
? Spacing
: // warns in Dev
() => undefined;
export const margin: SimpleStyleFunction<
| 'm'
| 'mt'
| 'mr'
| 'mb'
| 'ml'
| 'mx'
| 'my'
| 'margin'
| 'marginTop'
| 'marginRight'
| 'marginBottom'
| 'marginLeft'
| 'marginX'
| 'marginY'
| 'marginInline'
| 'marginInlineStart'
| 'marginInlineEnd'
| 'marginBlock'
| 'marginBlockStart'
| 'marginBlockEnd'
>;
export type MarginProps = PropsFor<typeof margin>;
export const padding: SimpleStyleFunction<
| 'p'
| 'pt'
| 'pr'
| 'pb'
| 'pl'
| 'px'
| 'py'
| 'padding'
| 'paddingTop'
| 'paddingRight'
| 'paddingBottom'
| 'paddingLeft'
| 'paddingX'
| 'paddingY'
| 'paddingInline'
| 'paddingInlineStart'
| 'paddingInlineEnd'
| 'paddingBlock'
| 'paddingBlockStart'
| 'paddingBlockEnd'
>;
export function getValue(
transformer: (prop: SpacingValueType) => SpacingValueType,
propValue: SpacingValueType,
): SpacingValueType;
export type PaddingProps = PropsFor<typeof padding>;
Event Timeline
Log In to Comment