From 5de52e76315ee4dc6ac56a109ce33a8a47acff5f Mon Sep 17 00:00:00 2001 From: "josh.bagwell" Date: Tue, 19 Sep 2023 20:38:29 -0600 Subject: [PATCH] feat: Adjusted button examples --- modules/labs-react/button/lib/PrimaryButton.tsx | 2 +- modules/labs-react/button/lib/SecondaryButton.tsx | 2 +- modules/labs-react/button/lib/TertiaryButton.tsx | 2 +- modules/react/button/stories/button/examples/Delete.tsx | 2 +- modules/react/button/stories/button/examples/Primary.tsx | 2 +- modules/react/button/stories/button/examples/PrimaryInverse.tsx | 2 +- modules/react/button/stories/button/examples/Secondary.tsx | 2 +- .../react/button/stories/button/examples/SecondaryInverse.tsx | 2 +- modules/react/button/stories/button/examples/Tertiary.tsx | 2 +- .../react/button/stories/button/examples/TertiaryInverse.tsx | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/modules/labs-react/button/lib/PrimaryButton.tsx b/modules/labs-react/button/lib/PrimaryButton.tsx index d80617e5ac..1fb04c9c19 100644 --- a/modules/labs-react/button/lib/PrimaryButton.tsx +++ b/modules/labs-react/button/lib/PrimaryButton.tsx @@ -114,7 +114,7 @@ export const PrimaryButton = createComponent('button')({ { children, icon, - iconPosition, + iconPosition = children ? undefined : 'only', shouldMirrorIcon, size, variant, diff --git a/modules/labs-react/button/lib/SecondaryButton.tsx b/modules/labs-react/button/lib/SecondaryButton.tsx index 216f0d0005..adc80f03b3 100644 --- a/modules/labs-react/button/lib/SecondaryButton.tsx +++ b/modules/labs-react/button/lib/SecondaryButton.tsx @@ -119,7 +119,7 @@ export const SecondaryButton = createComponent('button')({ children, colors, icon, - iconPosition, + iconPosition = children ? undefined : 'only', shouldMirrorIcon, size, variant, diff --git a/modules/labs-react/button/lib/TertiaryButton.tsx b/modules/labs-react/button/lib/TertiaryButton.tsx index 3a219177b9..eea07d0fac 100644 --- a/modules/labs-react/button/lib/TertiaryButton.tsx +++ b/modules/labs-react/button/lib/TertiaryButton.tsx @@ -223,7 +223,7 @@ export const TertiaryButton = createComponent('button')({ children, colors, icon, - iconPosition, + iconPosition = children ? undefined : 'only', shouldMirrorIcon, size, variant, diff --git a/modules/react/button/stories/button/examples/Delete.tsx b/modules/react/button/stories/button/examples/Delete.tsx index 7564e47699..9448202cfb 100644 --- a/modules/react/button/stories/button/examples/Delete.tsx +++ b/modules/react/button/stories/button/examples/Delete.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import {DeleteButton} from '@workday/canvas-kit-react/button'; +import {DeleteButton} from '@workday/canvas-kit-labs-react/button'; export const Delete = () => Click Me; diff --git a/modules/react/button/stories/button/examples/Primary.tsx b/modules/react/button/stories/button/examples/Primary.tsx index ede4ef219f..3abd6d0028 100644 --- a/modules/react/button/stories/button/examples/Primary.tsx +++ b/modules/react/button/stories/button/examples/Primary.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import {PrimaryButton} from '@workday/canvas-kit-react/button'; +import {PrimaryButton} from '@workday/canvas-kit-labs-react/button'; import {Flex} from '@workday/canvas-kit-react/layout'; import { plusIcon, diff --git a/modules/react/button/stories/button/examples/PrimaryInverse.tsx b/modules/react/button/stories/button/examples/PrimaryInverse.tsx index c0589600b7..c0ba8dc04c 100644 --- a/modules/react/button/stories/button/examples/PrimaryInverse.tsx +++ b/modules/react/button/stories/button/examples/PrimaryInverse.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import {PrimaryButton} from '@workday/canvas-kit-react/button'; +import {PrimaryButton} from '@workday/canvas-kit-labs-react/button'; import {Flex} from '@workday/canvas-kit-react/layout'; import { plusIcon, diff --git a/modules/react/button/stories/button/examples/Secondary.tsx b/modules/react/button/stories/button/examples/Secondary.tsx index cdeafc8c8c..03fe061b66 100644 --- a/modules/react/button/stories/button/examples/Secondary.tsx +++ b/modules/react/button/stories/button/examples/Secondary.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import {SecondaryButton} from '@workday/canvas-kit-react/button'; +import {SecondaryButton} from '@workday/canvas-kit-labs-react/button'; import {Flex} from '@workday/canvas-kit-react/layout'; import { plusIcon, diff --git a/modules/react/button/stories/button/examples/SecondaryInverse.tsx b/modules/react/button/stories/button/examples/SecondaryInverse.tsx index 4fa8bbc4fd..43a7f18629 100644 --- a/modules/react/button/stories/button/examples/SecondaryInverse.tsx +++ b/modules/react/button/stories/button/examples/SecondaryInverse.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import {SecondaryButton} from '@workday/canvas-kit-react/button'; +import {SecondaryButton} from '@workday/canvas-kit-labs-react/button'; import {Flex} from '@workday/canvas-kit-react/layout'; import { plusIcon, diff --git a/modules/react/button/stories/button/examples/Tertiary.tsx b/modules/react/button/stories/button/examples/Tertiary.tsx index 40504b4dfd..f5f73dbbab 100644 --- a/modules/react/button/stories/button/examples/Tertiary.tsx +++ b/modules/react/button/stories/button/examples/Tertiary.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import {TertiaryButton} from '@workday/canvas-kit-react/button'; +import {TertiaryButton} from '@workday/canvas-kit-labs-react/button'; import {Flex} from '@workday/canvas-kit-react/layout'; import { plusIcon, diff --git a/modules/react/button/stories/button/examples/TertiaryInverse.tsx b/modules/react/button/stories/button/examples/TertiaryInverse.tsx index d82dfc0e80..61ae2b6a60 100644 --- a/modules/react/button/stories/button/examples/TertiaryInverse.tsx +++ b/modules/react/button/stories/button/examples/TertiaryInverse.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import {TertiaryButton} from '@workday/canvas-kit-react/button'; +import {TertiaryButton} from '@workday/canvas-kit-labs-react/button'; import {Flex} from '@workday/canvas-kit-react/layout'; import { plusIcon,