diff --git a/src/__screenshot_tests__/__image_snapshots__/button-layout-screenshot-test-tsx-button-layout-ui-package-device-desktop-1-snap.png b/src/__screenshot_tests__/__image_snapshots__/button-layout-screenshot-test-tsx-button-layout-ui-package-device-desktop-1-snap.png index 8c323dbf14..77f678defa 100644 Binary files a/src/__screenshot_tests__/__image_snapshots__/button-layout-screenshot-test-tsx-button-layout-ui-package-device-desktop-1-snap.png and b/src/__screenshot_tests__/__image_snapshots__/button-layout-screenshot-test-tsx-button-layout-ui-package-device-desktop-1-snap.png differ diff --git a/src/__screenshot_tests__/__image_snapshots__/button-layout-screenshot-test-tsx-button-layout-ui-package-device-mobile-ios-1-snap.png b/src/__screenshot_tests__/__image_snapshots__/button-layout-screenshot-test-tsx-button-layout-ui-package-device-mobile-ios-1-snap.png index a0d689c577..cbf42539f9 100644 Binary files a/src/__screenshot_tests__/__image_snapshots__/button-layout-screenshot-test-tsx-button-layout-ui-package-device-mobile-ios-1-snap.png and b/src/__screenshot_tests__/__image_snapshots__/button-layout-screenshot-test-tsx-button-layout-ui-package-device-mobile-ios-1-snap.png differ diff --git a/src/__stories__/button-layout-story.tsx b/src/__stories__/button-layout-story.tsx index a2d5f7f56f..aaafd5eb48 100644 --- a/src/__stories__/button-layout-story.tsx +++ b/src/__stories__/button-layout-story.tsx @@ -51,6 +51,9 @@ const Template: React.FC = ({align = 'full-width'}) => ( primaryButton={ {}}>Ok} secondaryButton={ {}}>Cancel} /> + + Only link + Text link} /> ); diff --git a/src/button-layout.css.ts b/src/button-layout.css.ts index b115088881..bb3d2d9beb 100644 --- a/src/button-layout.css.ts +++ b/src/button-layout.css.ts @@ -88,7 +88,7 @@ export const link = style([ }, ]); -export const linkWithTwoButtons = style([ +export const linkInNewLine = style([ linkBase, { selectors: { diff --git a/src/button-layout.tsx b/src/button-layout.tsx index 9f089b5aa9..b182c519a9 100644 --- a/src/button-layout.tsx +++ b/src/button-layout.tsx @@ -59,7 +59,7 @@ const ButtonLayout: React.FC = ({ const linkContainer = link ? (
1 ? styles.linkWithTwoButtons : styles.link)} + className={classnames(numberOfButtons !== 1 ? styles.linkInNewLine : styles.link)} data-link="true" > {link}