SearchCtrlK

  • ↑↓navigate
  • ↵open
  • escclose

Can’t find it? Contact us

On this page

graphicHostStyle

The flex-item layout and current-color declarations shared by a leading graphic slot.

tsx
import { graphicHostStyle } from "@sdxc/ui/app";

Usage

A shrink-resistant, nudged-down, current-colored mixin for a leading graphic slot, keeping an icon and a loading graphic laid out identically. fg("currentcolor") matches @sdxc/u's case-normalized token lookup.

Signature

typescript
graphicHostStyle<Node extends Element = Element>(): MixinDescriptor<
	Node,
	[styles: CSSStyles],
	ElementProps
>

Returns a css() mixin ready for a host element's mix prop.

Examples

tsx
<div data-slot="icon" mix={[graphicHostStyle(), css({ ...ownStyles })]}>
  <CircleCheckIcon />
</div>;
@sdxc/ui

Can’t find it? Contact us