Trouble making @wordpress/dataviews look like Storybook examples (headers alignment, dividers, composition API mismatch) #71976
Unanswered
ivanjeremic
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Trouble making
@wordpress/dataviewsmatch Storybook examples (header alignment, dividers, composition API)Hi everyone,
I’m integrating
@wordpress/dataviewsinto a WordPress admin screen and I can’t get it to visually match the official Storybook examples:https://wordpress.github.io/gutenberg/?path=/docs/dataviews-dataviews--docs
Issues I’m Hitting
render.<DataViews>,<Search>,<Layout>,<Pagination>etc. but those sub-components aren’t exported from@wordpress/dataviews/wpin my installed version (TypeScript import errors).alignoption (e.g. in column or layout config) but the installedtypes.tsdoesn’t includealigninColumnStyle; adding it causes type errors.layout.stylesfeels brittle — Widths work but feel hacky; removing them yields unexpected centering or compression.<DataViews> ...children... </DataViews>gives:Property 'children' does not exist on type ...Environment
@wordpress/dataviews/wp(version bundled with current WP/Gutenberg; can provide exact version if needed)@wordpress/elementWhat I Expected
What I Got
Search,Layout,Pagination)alignchildrennot accepted on main<DataViews>(in this version?)Minimal Field Config
Attempts So Far
Questions
Any guidance on:
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions