Skip to content

Conversation

@aveline
Copy link
Contributor

@aveline aveline commented Apr 25, 2023

WHY are these changes introduced?

Fixes #8794 #8797

WHAT is this pull request doing?

  • Update Link props to align API
  • Update Link tests
  • Update Link stories

How to 🎩

View examples in Playground

Copy-paste this code in playground/Playground.tsx:
import {ChevronLeftMinor} from '@shopify/polaris-icons';
import React from 'react';

import {
  AlphaCard,
  Banner,
  HorizontalStack,
  Icon,
  Link,
  Page,
  VerticalStack,
} from '../src';

export function Playground() {
  return (
    <Page title="Playground">
      {/* Add the code you want to test in here */}
      <VerticalStack gap="4">
        <AlphaCard>
          <VerticalStack gap="2">
            <Link href="#">Link as anchor</Link>
            <Link onClick={() => {}}>Link as button</Link>
            <span>
              Determine{' '}
              <Link href="#" underline="always">
                tax rates
              </Link>
            </span>
            <Link href="#" target="_blank">
              External with target blank
            </Link>
            <Link href="#">
              <HorizontalStack align="start">
                <Icon source={ChevronLeftMinor} />
                Link
              </HorizontalStack>
            </Link>
          </VerticalStack>
        </AlphaCard>
        <AlphaCard>
          <Banner>
            Determine{' '}
            <Link href="#" underline="always" tone="inherit">
              tax rates
            </Link>
          </Banner>
        </AlphaCard>
      </VerticalStack>
    </Page>
  );
}

@aveline aveline added the #gsd:32613 Button and Link component quality label Apr 25, 2023
@aveline aveline self-assigned this Apr 25, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Apr 25, 2023

size-limit report 📦

Path Size
polaris-react-cjs 242.64 KB (+0.02% 🔺)
polaris-react-esm 157.13 KB (+0.01% 🔺)
polaris-react-esnext 219.58 KB (-0.01% 🔽)
polaris-react-css 47.46 KB (-0.04% 🔽)

@aveline
Copy link
Contributor Author

aveline commented May 12, 2023

Closing as this is replaced by #9185

@aveline aveline closed this May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

#gsd:32613 Button and Link component quality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Button and Link quality] [Milestone 1] Update Link component

1 participant