Skip to content

Conversation

aveline
Copy link
Contributor

@aveline aveline commented Mar 7, 2023

WHY are these changes introduced?

Support adding spacing at the top and bottom of a stack.

WHAT is this pull request doing?

Add paddingBlockStart and paddingBlockEnd props to allow adding spacing at the top or bottom of a stack.

  • Values can be responsive by breakpoint
Examples Screenshot 2023-03-07 at 2 45 25 PM Screenshot 2023-03-07 at 2 45 33 PM

How to 🎩

Copy-paste this code in playground/Playground.tsx:
import React from 'react';

import {Page, AlphaStack, Box} from '../src';

export function Playground() {
  return (
    <Page title="Playground">
      {/* Add the code you want to test in here */}
      <Box background="surface-subdued" border="dark">
        <AlphaStack
          gap="4"
          paddingBlockStart={{sm: '2', md: '6'}}
          paddingBlockEnd={{sm: '2', md: '6'}}
        >
          <Box background="surface-attention" padding="10" />
          <Box background="surface-highlight" padding="10" />
          <Box background="surface-attention" padding="10" />
        </AlphaStack>
      </Box>
    </Page>
  );
}

@github-actions
Copy link
Contributor

github-actions bot commented Mar 7, 2023

size-limit report 📦

Path Size
polaris-react-cjs 221.19 KB (+0.02% 🔺)
polaris-react-esm 140.7 KB (+0.02% 🔺)
polaris-react-esnext 197.4 KB (+0.1% 🔺)
polaris-react-css 43.02 KB (+0.39% 🔺)

@aveline aveline requested a review from laurkim March 7, 2023 23:16
@aveline
Copy link
Contributor Author

aveline commented Mar 8, 2023

Closing as we don't have alignment on this change as it expands the responsibility of Stack.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants