DmAuxiliary
DmAuxiliary documents the DmAuxiliary export from duskmoon.
@duskmoon-dev/components/dm-auxiliary Usage
When to use
- Use it in DuskMoon application screens that need a packaged, opinionated workflow component.
- Reach for the lower-level standard component when the screen needs custom composition.
Implementation notes
Features
Wraps lower-level primitives into a higher-level DuskMoon-prefixed workflow API.
Examples show the defaults and composition points expected by internal DuskMoon app screens.
DmAuxiliary is most often configured through `content`, `hideClose`, `icon`, `actions`.
Renders html content and closes
Feature Demos
Feature demos are authored for the component page, then supplemented with behavior scenarios from the component test coverage.
Basic usage
Import the component stylesheet and DmAuxiliary from its package subpath, then render it with the core props.
import "@duskmoon-dev/components/styles.css";
import { DmAuxiliary } from "@duskmoon-dev/components/dm-auxiliary";
export function Example() {
return (<DmAuxiliary>DuskMoon Dm Auxiliary</DmAuxiliary>);
} Renders html content and closes
test-backedDmAuxiliary scenario from the component test coverage: renders html content and closes.
import "@duskmoon-dev/components/styles.css";
import { DmAuxiliary } from "@duskmoon-dev/components/dm-auxiliary";
export function DmAuxiliaryRendersHtmlContentAndDemo() {
return (<DmAuxiliary>DuskMoon Dm Auxiliary</DmAuxiliary>);
} Supports children, hidden close, actions, extra, and custom icon
test-backedDmAuxiliary scenario from the component test coverage: supports children, hidden close, actions, extra, and custom icon.
import "@duskmoon-dev/components/styles.css";
import { DmAuxiliary } from "@duskmoon-dev/components/dm-auxiliary";
export function DmAuxiliarySupportsChildrenHiddenCloseDemo() {
return (<DmAuxiliary>DuskMoon Dm Auxiliary</DmAuxiliary>);
} Does not render without content
test-backedDmAuxiliary scenario from the component test coverage: does not render without content.
import "@duskmoon-dev/components/styles.css";
import { DmAuxiliary } from "@duskmoon-dev/components/dm-auxiliary";
export function DmAuxiliaryDoesNotRenderWithoutDemo() {
return (<DmAuxiliary>DuskMoon Dm Auxiliary</DmAuxiliary>);
} Theme aware
Docs previews inherit the DuskMoon data-theme value. Use the header switch to compare light and dark rendering.
<div data-theme="sunshine">
<DmAuxiliary>DuskMoon Dm Auxiliary</DmAuxiliary>
</div>
<div data-theme="moonlight">
<DmAuxiliary>DuskMoon Dm Auxiliary</DmAuxiliary>
</div> API
The API reference below lists every parsed exported type or interface for DmAuxiliary. Start with `content`, `hideClose`, `icon`, `actions` for common usage.
packages/components/src/components/dm-auxiliary/DmAuxiliary.types.ts
Scenarios: packages/components/src/components/dm-auxiliary/DmAuxiliary.test.tsx | Prop | Type | Required | Description |
|---|---|---|---|
content | string | No | content configures DmAuxiliary. |
children | ReactNode | No | children configures DmAuxiliary. |
hideClose | boolean | No | hideClose configures DmAuxiliary. |
icon | ReactNode | No | icon configures DmAuxiliary. |
actions | DmAuxiliaryAction[] | No | actions configures DmAuxiliary. |
extra | ReactNode | No | extra configures DmAuxiliary. |
onClose | () => void | No | onClose configures DmAuxiliary. |
| Prop | Type | Required | Description |
|---|---|---|---|
label | ReactNode | Yes | label configures DmAuxiliary. |
onClick | () => void | No | onClick configures DmAuxiliary. |
disabled | boolean | No | disabled configures DmAuxiliary. |