Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add flex to ContentWrapper on Banner component #3062

Merged
merged 2 commits into from
Jun 18, 2020

Conversation

tarynmusgrave
Copy link
Contributor

@tarynmusgrave tarynmusgrave commented Jun 17, 2020

Co-authored-by: Shannon Broekhoven shannon.broekhoven@shopify.com

WHY are these changes introduced?

This is required for https://github.com/Shopify/web/pull/28529

WHAT is this pull request doing?

Add flex to ContentWrapper on Banner component so that ContentWrapper fills width of Banner. This is required to allow for aligning elements on the right side of the Banner.

CURRENT
Current Banner in with fill

AFTER
In Card Banner with flex:1 1 auto

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

import {Page, Card, Banner, Stack} from '../src';

export function Playground() {
  return (
    <Page title="Playground">
      <Card>
        <Banner status="warning" onDismiss={() => {}}>
          <Stack>
            <Stack.Item fill>Balance (Customer owes you)</Stack.Item>
            <Stack.Item>$10.11</Stack.Item>
          </Stack>
        </Banner>
      </Card>
    </Page>
  );
}

🎩 checklist

  • Tested on mobile
  • Tested on multiple browsers
  • Tested for accessibility
  • Updated the component's README.md with documentation changes
  • Tophatted documentation changes in the style guide
  • For visual design changes, pinged one of @ HYPD, @ mirualves, @ sarahill, or @ ry5n to update the Polaris UI kit

Co-authored-by: Shannon Broekhoven <shannon.broekhoven@shopify.com>
@github-actions
Copy link
Contributor

github-actions bot commented Jun 17, 2020

🟢 This pull request modifies 2 files and might impact 1 other files.

Details:
All files potentially affected (total: 1)
📄 UNRELEASED.md (total: 0)

Files potentially affected (total: 0)

🎨 src/components/Banner/Banner.scss (total: 1)

Files potentially affected (total: 1)

@tarynmusgrave tarynmusgrave added the Bug Something is broken and not working as intended in the system. label Jun 17, 2020
UNRELEASED.md Outdated Show resolved Hide resolved
Copy link
Contributor

@dleroux dleroux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a small suggestion for the change log but otherwise looks good 🎉

Co-authored-by: Daniel Leroux <dleroux@users.noreply.github.com>
@tarynmusgrave tarynmusgrave requested review from AndrewMusgrave and removed request for AndrewMusgrave June 18, 2020 13:27
@tarynmusgrave tarynmusgrave merged commit 62202c0 into master Jun 18, 2020
@tarynmusgrave tarynmusgrave deleted the banner-styling-change branch June 18, 2020 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken and not working as intended in the system.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants