Is it possible to change the page
function based on number of stories, or arbitrary params?
#11714
Unanswered
redders6600
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently in
preview.js
I have the followingaddParameters
call which defines a custompage
function foraddon-docs
.Some of our docs pages don't have any components (so no props table to display), and others have only one story. In those cases we don't want to repeat the primary story underneath (when we have multiple stories we do).
What would be nice (but I'm not sure if possible!) is if we could do something like this.
I realise that
docs
itself is a param, so there would be a weird circular reference there, but essentially what I'm trying to do is dynamically generate the page based on any info that might be available... so is there any info available that we could pass to the custompage
function?Beta Was this translation helpful? Give feedback.
All reactions