bitstyles icon indicating copy to clipboard operation
bitstyles copied to clipboard

Add component: button-list

Open planktonic opened this issue 3 years ago • 0 comments

We commonly have buttons in a list, that we want to be laid out in a row when there’s enough space, then stacked vertically, and taking the full width available, when there’s not

in ascii:

// large screens
|  button 1  |  button 2  |  button 3  |

// small screens
|      button 1      |
|      button 2      |
|      button 3      |

Right now we use a bunch of utility classes to do this, but it’d be great to pave that cowpath.

<ul class="a-list-reset u-flex u-flex-col u-flex-row@m u-gap-l">
    <li class="u-flex u-flex-col">
        <button>save</button>
    </li>
    <li class="u-flex u-flex-col">
        <button>save</button>
    </li>
</ul>

planktonic avatar Feb 09 '22 10:02 planktonic