Coder Social home page Coder Social logo

Comments (4)

shilman avatar shilman commented on April 28, 2024

@JReinhold @cdedreuille is this an intentional 8.0 change?

from storybook.

valentinpalkovic avatar valentinpalkovic commented on April 28, 2024

This was already an intentional change for Storybook 7. See #20898 and #20897

A left property doesn't exist. You must use icon if you want to place an icon on the left. See the property definition here: https://github.com/storybookjs/storybook/blob/next/code/ui/components/src/components/tooltip/ListItem.tsx#L175

@stevensacks Where did you find the information that the left property can be configured? Have we documented it somewhere wrongly?

from storybook.

stevensacks avatar stevensacks commented on April 28, 2024

Ok. I see in the code you linked that even though there is a component called <Left> the “left” prop has been removed in favor of an “icon” prop. I noticed there are two props for the center called “center” and “title”, and a “right” prop for the <Right> component. The naming isn’t consistent, so it’s a bit confusing 😅

The “icon” prop is not technically an icon, it’s a ReactNode, so it could be text, or an emoji (like my example usage). Maybe that’s why it was named “left” all these years? 🤷🏻‍♂️

I’ll change my addon to use the new name, but since this is a breaking change for all addons that use the TooltipListLink component, it should be included in the migration docs 🙏🏼

from storybook.

valentinpalkovic avatar valentinpalkovic commented on April 28, 2024

@stevensacks I have added an entry to the migration docs here:
#26324

Please reach out if you need some further help. And don't get confused about the icon property in globalTypes, because before we pass the icon further to the ToolTipListLink component, we will pass the string into the Icon component from @storybook/components (which is deprecated).

And I agree. The API of the TooltipListLink is pretty messy. I hope, at some point, we can clean it up! Thanks for pointing it out.

from storybook.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.