Replies: 1 comment 2 replies
-
Our exemplar app uses some custom styling at the moment (using the legacy CSS classes) so it may be worth having a look at how that would fit in as well. One thing I'd highlight (for option 1 in particular) is that some components like It looks like this is accounted for in option 2 and 3, but the other thing that comes to mind the DOM hierarchy is a bit complex in some places (e.g. |
Beta Was this translation helpful? Give feedback.
-
Having recently looked at an issue: #1998. Once I thought about documenting this, I was wondering if there was a better way.
I experimented with different ideas in a spike https://github.com/Royal-Navy/design-system/commits/spike/timeline-row-height
Browsing through each commit is best.
Option 1
More conventional styled components approach but the downside is that it would mean exposing our partials and effectively give us a larger contract with the consumers which could mean there are more breaking changes
Option 2
Props specifically for CSS of nested components. The downside here is that it is CSS props only and something I have been thinking about is that we allow arbitrary props (eg
data-testid
) to be drilled into components but maybe it would help to have more granular control over theseOption 3
Props drilled to relevant component which gives the most flexibility
It is felt that option 3 will be the most appropriate for the Timeline as we have provided the framework with minimal styling. Going forward it might be that we provide more styling out-of-the-box and there is less need for customising but this is not the case now.
All feedback is welcome.
Beta Was this translation helpful? Give feedback.
All reactions