@treasuryspatial/feedback-kit
v0.2.1
Published
Treasury's feedback primitives (React, styled-components 6): modal, toast provider and viewport, and the contract-failure block re-exported from surface-primitives.
Readme
@treasuryspatial/feedback-kit
Modal, toast and the visible contract failure for Treasury surfaces. React, styled-components 6, tokens only.
import { TreasuryModal, TreasuryToastProvider, TreasuryToastViewport, useTreasuryToast, TreasuryContractFailure } from '@treasuryspatial/feedback-kit';| Export | What it is |
| --- | --- |
| TreasuryModal | dialog with title, body, footer and a Close button; renders nothing when isOpen is false |
| TreasuryToastProvider, useTreasuryToast | toast state; the hook throws outside the provider |
| TreasuryToastViewport | the polite live region that shows toasts |
| TreasuryContractFailure, TreasuryContractIssues | re-exported from surface-primitives |
- Peers: React ≥ 18, styled-components ^6.1,
@treasuryspatial/surface-primitives,@treasuryspatial/treasury-design-tokens.
Release
npm ci
npm run build
npm testBump version and merge to main: the publish-npm workflow publishes it with npm trusted publishing. The
first version of a package that is not on npm yet is published once by hand by the scope owner (npm publish).
