diff --git a/src/components/Accordion/Accordion.Codesandbox.stories.mdx b/src/components/Accordion/Accordion.Codesandbox.stories.mdx index cfb794e7f..825ac0006 100644 --- a/src/components/Accordion/Accordion.Codesandbox.stories.mdx +++ b/src/components/Accordion/Accordion.Codesandbox.stories.mdx @@ -42,7 +42,7 @@ export default () => { > What is solar energy? How do solar panels work? - +

Solar panels, also called photovoltaic or PV panels, consist of solar cells that are designed to capture the radiant light and heat contained in sunlight and convert it diff --git a/src/components/Accordion/Accordion.Overview.stories.mdx b/src/components/Accordion/Accordion.Overview.stories.mdx index 787d02287..ae3f7238d 100644 --- a/src/components/Accordion/Accordion.Overview.stories.mdx +++ b/src/components/Accordion/Accordion.Overview.stories.mdx @@ -50,7 +50,7 @@ Accordions are useful when you want to toggle between hiding and showing additio > What is solar energy? How do solar panels work? - +

Solar panels, also called photovoltaic or PV panels, consist of solar cells that are designed to capture the radiant light and heat contained in sunlight and convert it diff --git a/src/components/Accordion/AccordionPanelSummary.tsx b/src/components/Accordion/AccordionPanelSummary.tsx index fe4878e4d..d6ce3de65 100644 --- a/src/components/Accordion/AccordionPanelSummary.tsx +++ b/src/components/Accordion/AccordionPanelSummary.tsx @@ -17,7 +17,7 @@ export const AccordionPanelSummary: React.FC = ({ ...restProps }) => ( = ({ return ( = ({ {render ? ( render() ) : ( - + {title && ( {title} diff --git a/src/components/Badge/Badge.Overview.stories.mdx b/src/components/Badge/Badge.Overview.stories.mdx index 9437a98db..682e86edf 100644 --- a/src/components/Badge/Badge.Overview.stories.mdx +++ b/src/components/Badge/Badge.Overview.stories.mdx @@ -45,7 +45,7 @@ Badges come in different variants based on the kind of message being delivered t 'danger', ]; return ( - + {variants.map(variant => ( ))} @@ -65,7 +65,7 @@ so the badge can be a different size per breakpoint. {() => { return ( <> - + diff --git a/src/components/Badge/Badge.VisualTests.stories.tsx b/src/components/Badge/Badge.VisualTests.stories.tsx index bdd13221d..aea3efb38 100644 --- a/src/components/Badge/Badge.VisualTests.stories.tsx +++ b/src/components/Badge/Badge.VisualTests.stories.tsx @@ -15,10 +15,10 @@ export default { } as Meta; const Template: Story = args => ( - + {BADGE_SIZES.map(size => ( - - + + {BADGE_VARIANTS.map(variant => ( ` is a layout component to build UIs with consistent padding and spacing - Its content is arranged in a specified `direction`, with 'column' being the default - Renders a `

` element by default, but can be changed using `as` -- Allows you to specify the spacing between child elements using `childGap` +- Allows you to specify the spacing between child elements using `gap` - Many props accept `ResponsiveProp` that take an object with keys that correspond to breakpoint tokens ```js codesandbox=palmetto-components @@ -16,7 +16,7 @@ import React from 'react'; import { Box } from '@palmetto/palmetto-components'; export default () => ( - + ( > I am a box with a green background and border - + diff --git a/src/components/Box/Box.Playground.stories.tsx b/src/components/Box/Box.Playground.stories.tsx index 4c0728c99..000ef4aa4 100644 --- a/src/components/Box/Box.Playground.stories.tsx +++ b/src/components/Box/Box.Playground.stories.tsx @@ -29,7 +29,19 @@ export default { description: 'number of child Boxes to render within the parent Box', defaultValue: 5, }, - childGap: { + gap: { + control: { + type: 'select', + options: [null, ...SPACING_OPTIONS], + }, + }, + columnGap: { + control: { + type: 'select', + options: [null, ...SPACING_OPTIONS], + }, + }, + rowGap: { control: { type: 'select', options: [null, ...SPACING_OPTIONS], @@ -439,7 +451,7 @@ Playground.args = { direction: 'row', childWidth: 'lg', childHeight: 'lg', - childGap: 'sm', + gap: 'sm', padding: 'lg', width: '100', childBackground: 'white', diff --git a/src/components/Box/Box.tsx b/src/components/Box/Box.tsx index 6cd2dd703..eefe1224f 100644 --- a/src/components/Box/Box.tsx +++ b/src/components/Box/Box.tsx @@ -102,7 +102,7 @@ export interface BoxProps { /** * Sets the gaps (gutters) between columns. */ - columnGap?: BaseSpacing | ResponsiveProp | string; + columnGap?: BaseSpacing | ResponsiveProp; /** * Cursor style. Use any standard CSS value. */ @@ -172,7 +172,7 @@ export interface BoxProps { /** * Sets the gaps (gutters) between rows and columns. */ - gap?: BaseSpacing | ResponsiveProp | string; + gap?: BaseSpacing | ResponsiveProp; /** * How space between and around content items is distributed along the main-axis a flex Box */ @@ -228,7 +228,7 @@ export interface BoxProps { /** * Sets the gaps (gutters) between rows. */ - rowGap?: BaseSpacing | ResponsiveProp | string; + rowGap?: BaseSpacing | ResponsiveProp; /** * The size of the drop shadow applied to the Box */ diff --git a/src/components/Button/Button.Overview.stories.mdx b/src/components/Button/Button.Overview.stories.mdx index 9dcf2530a..a204a2de7 100644 --- a/src/components/Button/Button.Overview.stories.mdx +++ b/src/components/Button/Button.Overview.stories.mdx @@ -35,7 +35,7 @@ The `variant` prop determines which color variant to render. }, }} > - + @@ -63,7 +63,7 @@ the color of the primary CTA but makes the hierarchy clear. The background is tr }, }} > - + @@ -103,7 +103,7 @@ so it can have different sizes at different breakpoints. }, }} > - + @@ -149,7 +149,7 @@ Use the `fullWidth` prop to allow the button to grow to its container's full wid - + @@ -172,7 +172,7 @@ Add an icon to the left or right inside the Button using the `iconPrefix` and `i Chat Now - + )} - + {BUTTON_VARIANTS.map(variant => ( , + ); + expect(screen.getByText('Alarm Button').parentElement.classList).toContain('g-xs'); + }); test('Renders smaller gap between icon and text for xs sized buttons', () => { render( , ); - expect(screen.getByText('Alarm Button').classList).toContain('m-right-2xs'); + expect(screen.getByText('Alarm Button').parentElement.classList).toContain('g-2xs'); }); }); diff --git a/src/components/Button/Button.tsx b/src/components/Button/Button.tsx index 8c6c0494f..6c7a54946 100644 --- a/src/components/Button/Button.tsx +++ b/src/components/Button/Button.tsx @@ -174,7 +174,7 @@ export const Button = forwardRef {isLoading && (