MaibornWolff / mwui

Storybook (dev): https://maibornwolff.github.io/mwui-dev
https://maibornwolff.github.io/mwui
MIT License
7 stars 0 forks source link

[Feat] Custom control over cards #181

Open philipbrembeck opened 1 year ago

philipbrembeck commented 1 year ago

Is your feature request related to a problem? Please describe. Currently, the MW-Card offers me the option to input Data via Props (e.g. Title, Subtitle, etc.).

Describe the solution you'd like I would like to have more control over the data inside the card and would therefore prefer to input this data as children. Something like this would be nice:

<mw-card elevated>
  <mw-card-image
    src="https://placedog.net/250/150?id=3"
    alt="card image"
  ></mw-card-image>
  <mw-card-title>This is the cards heading</mw-card-title>
  <mw-card-subtitle>This is the cards subtitle</mw-card-subtitle>
  <mw-card-content>This is the cards content</mw-card-content>
</mw-card>
Fuasmattn commented 1 year ago

Not sure if it's the correct card component you are referring to. The MwCard component is structured similar to what you describe, see https://maibornwolff.github.io/mwui/?path=/docs/components-card--card-full

The linked example shows a card with all options used, they can be included selectively of course to fulfil most needs. Would you still miss any option?