Add SectionMessage story#9
Open
nathanfranklin wants to merge 2 commits into
Open
Conversation
wesleyboar
reviewed
Jan 31, 2025
Comment on lines
+8
to
+10
| .message { | ||
| margin-bottom: 0; | ||
| } No newline at end of file |
Member
There was a problem hiding this comment.
I think this style is not necessary, because the margin-bottom: 0 is already present for <p> (default element) and inherent for <div> (typical alternative element) (screenshot).
Musing on the current Message components styles…
I've long since thought:
-
Some
marginshould always be present between multiple messages; perhaps:.container + .container:not(p) /* ignore `<p>` cuz it typically has margin */ { margin-top: /* …something, maybe `1rem` */ }
-
The default tag should be
<div>.
So use of<p>by client can rely on whatever<p>margin they set (or allow from browser).
Comment on lines
+1
to
+6
| .container { | ||
| display: flex; | ||
| flex-direction: column; | ||
| gap: 1rem; | ||
| padding: 1rem; | ||
| } |
Member
There was a problem hiding this comment.
I would not add these styles to the demo, because:
- The lack of space between messages shows clients what will happen by default if they stack multiple.
- Storybook already adds space to the
<body>in the preview window (via.sb-main-padded). If we start doing it for every.container(or.rootor whatever the element may be classed), then we give ourselves a chore to remain consistent.
Member
There was a problem hiding this comment.
I love this! Seeing a new story is… indescribably satisfying.
I do notice:
- the
scopeoption is not working (screenshot) - the
typeoption is ineffectual
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Add a simple section message storybook story
Related
None
Screenshots
Notes
@wesleyboar , just trying story book out.