frontend: add WarnBanner Preact component, compose ApiErrorPanel from it
mara, on review: "i want each component to import its own css file itself[;] if you need a bunch of extra css externally, its not a proper component ... you may need to migrate other components that you would want to use first". WarnBanner is the Preact-component successor to the shadow-DOM <hive-warn> custom element (same three-tier info/warning/error visual language, colours copied faithfully from hive-warn.css). ApiErrorPanel now composes it instead of owning a copy of the border/colour/pulse rules itself — its own CSS is back down to just the layout that's actually specific to it (heading, copy button, detail text). Re-verified with a fresh mock-server screenshot: same rendered output as before, now via composition instead of a duplicated banner shape.
This commit is contained in:
parent
f60aab4717
commit
ca84079a21
5 changed files with 94 additions and 35 deletions
|
|
@ -34,7 +34,9 @@
|
|||
"./jobq-rollup.css": "./src/jobq-rollup/jobq-rollup.css",
|
||||
"./api-error.js": "./src/api-error.ts",
|
||||
"./api-error-panel.js": "./src/api-error-panel/ApiErrorPanel.tsx",
|
||||
"./api-error-panel.css": "./src/api-error-panel/api-error-panel.css"
|
||||
"./api-error-panel.css": "./src/api-error-panel/api-error-panel.css",
|
||||
"./warn-banner.js": "./src/warn-banner/WarnBanner.tsx",
|
||||
"./warn-banner.css": "./src/warn-banner/WarnBanner.css"
|
||||
},
|
||||
"files": [
|
||||
"src/"
|
||||
|
|
|
|||
Loading…
Reference in a new issue