@patreon/studio
Version:
Patreon Studio Design System
41 lines (40 loc) • 1.79 kB
TypeScript
import type { AriaAttributes } from 'react';
import type { AssignableElementProps, BaseProps, ChildrenProps, StylableProps } from '~/types/component';
import type { SpaceToken } from '~/types/tokens';
import type { ValueOrResponsive } from '~/utilities/opaque-responsive';
export interface SpacerProps extends AssignableElementProps, AriaAttributes, BaseProps, Omit<StylableProps, 'className'>, ChildrenProps {
/** Spacing to apply to all margins */
m?: ValueOrResponsive<SpaceToken>;
/** Spacing to apply to top and bottom margins */
mv?: ValueOrResponsive<SpaceToken>;
/** Spacing to apply to left and right margins */
mh?: ValueOrResponsive<SpaceToken>;
/** Spacing to apply to top margin */
mt?: ValueOrResponsive<SpaceToken>;
/** Spacing to apply to bottom margin */
mb?: ValueOrResponsive<SpaceToken>;
/** Spacing to apply to left margin */
ml?: ValueOrResponsive<SpaceToken>;
/** Spacing to apply to right margin */
mr?: ValueOrResponsive<SpaceToken>;
/** Spacing to apply to all padding */
p?: ValueOrResponsive<SpaceToken>;
/** Spacing to apply to top and bottom padding */
pv?: ValueOrResponsive<SpaceToken>;
/** Spacing to apply to left and right padding */
ph?: ValueOrResponsive<SpaceToken>;
/** Spacing to apply to top padding */
pt?: ValueOrResponsive<SpaceToken>;
/** Spacing to apply to bottom padding */
pb?: ValueOrResponsive<SpaceToken>;
/** Spacing to apply to left padding */
pl?: ValueOrResponsive<SpaceToken>;
/** Spacing to apply to right padding */
pr?: ValueOrResponsive<SpaceToken>;
/**
* Custom className applied to the root element
*
* @deprecated do not mix usage of `Spacer` with CSS modules
*/
className?: string;
}