Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible bug when reading parameters? #126

Open
Smolations opened this issue Sep 20, 2022 · 2 comments
Open

Possible bug when reading parameters? #126

Smolations opened this issue Sep 20, 2022 · 2 comments

Comments

@Smolations
Copy link

Some lists of tokens, like colors, are often very long. It makes sense to have a search field for them. Others, like line height, will contain just a couple. In trying to disable the search field for just a single set of tokens in MDX fails for me. No errors, just doesn't work (input remains visible). According to the storybook MDX blocks documentation, these should be allowed via the <Meta /> block. However, trying this with with your addon has no effect. Basically, I tried this within the MDX:

<Meta
  title="Design Tokens/Line Height"
  parameters={{ designToken: { showSearch: false } }}
/>

I also tried the same on the provided <DesignTokenDocBlock /> as well, also with no effect. Is this not supported?

@Sqrrl
Copy link
Collaborator

Sqrrl commented Nov 20, 2022

I'll look into it. Maybe an oversight.

@acherkashin
Copy link
Contributor

@Smolations DesignTokenDocBlock doesn't use configuration provided to Meta parameters.

To disable search, you just need to use showSearch of the DesignTokenDocBlock component in the following way:

<DesignTokenDocBlock categoryName="Colors" maxHeight="none" viewType="table" showSearch={false}/>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants