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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CalloutCard] Fix heading overflow when dismissible #4135

Merged
merged 1 commit into from
Apr 21, 2021

Conversation

mateus
Copy link
Member

@mateus mateus commented Apr 21, 2021

WHY are these changes introduced?

Fixes heading overflow issue when the CalloutCard is dismissible.

Screen Shot 2021-04-20 at 10 41 29 PM

WHAT is this pull request doing?

Fixes the issue by adding padding to the right on the CalloutCard container when it is dismissible. The spacing was inspired by the dismissible Banner.

Mobile

Screen Shot 2021-04-20 at 10 41 57 PM

Tablet/Desktop

Screen Shot 2021-04-20 at 10 39 25 PM

How to 馃帺

馃枼 Local development instructions
馃棐 General tophatting guidelines
馃搫 Changelog guidelines

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

import {Page, CalloutCard} from '../src';

export function Playground() {
  return (
    <Page title="Playground">
      <CalloutCard
        title="Customize the style of your checkout"
        illustration="https://cdn.shopify.com/s/assets/admin/checkout/settings-customizecart-705f57c725ac05be5a34ec20c05b94298cb8afd10aac7bd9c7ad02030f48cfa0.svg"
        primaryAction={{content: 'Customize checkout'}}
        onDismiss={() => {}}
      >
        <p>Upload your store鈥檚 logo, change colors and fonts, and more.</p>
      </CalloutCard>
      );
    </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 @鈥奌YPD, @鈥妋irualves, @鈥妔arahill, or @鈥妑y5n to update the Polaris UI kit

@github-actions
Copy link
Contributor

github-actions bot commented Apr 21, 2021

馃煝 This pull request modifies 3 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/CalloutCard/CalloutCard.scss (total: 1)

Files potentially affected (total: 1)

馃З src/components/CalloutCard/CalloutCard.tsx (total: 0)

Files potentially affected (total: 0)

@mateus mateus force-pushed the callout-ondismiss-heading-fix branch 2 times, most recently from 959455c to af24914 Compare April 21, 2021 03:22
@mateus mateus marked this pull request as ready for review April 21, 2021 03:23
@mateus mateus force-pushed the callout-ondismiss-heading-fix branch from af24914 to 509c9f0 Compare April 21, 2021 03:32
Copy link
Contributor

@Tom-Bonnike Tom-Bonnike left a comment

Choose a reason for hiding this comment

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

Makes sense to me!

Copy link
Contributor

@kyledurand kyledurand left a comment

Choose a reason for hiding this comment

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

馃檶 Thanks @mateus

@mateus mateus merged commit 1589eb4 into main Apr 21, 2021
@mateus mateus deleted the callout-ondismiss-heading-fix branch April 21, 2021 14:30
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.

None yet

3 participants