jpmorganchase / salt-ds

React UI components built with a focus on accessibility, customization and ease-of-use
https://www.saltdesignsystem.com
Apache License 2.0
129 stars 90 forks source link

Nested StackLayouts with separators share tokens #2698

Open libertymayc opened 11 months ago

libertymayc commented 11 months ago

Package name(s)

Core (@salt-ds/core)

Package version(s)

most recent

Description

When you nest a Stack Layout (of row direction - potentially will happen with both directions) within another, and set the inner gap to be different, the position of the first separator picks up the --stackLayout-gap-multiplier token from the nested Layout

At the same time, can clean up some tokens/code throughout of seEerator spelling, which differ from the spelling of 'sepArators' prop

Steps to reproduce

<StackLayout separators>
    <StackLayout gap={7} separators direction={'row'}>
        <div>hello</div>
        <div>hello</div>
    </StackLayout>
    <div>something else</div>
</StackLayout>

notice the outer stack picks up the gap of 7 coming from nested layout

Expected behavior

tokens should respect their own gap

Operating system

Browser

Are you a JPMorgan Chase & Co. employee?

mark-tate commented 2 weeks ago

@libertymayc is this still an issue ?