Skip to content

Commit

Permalink
Merge pull request #2362 from Royal-Navy/fix/dialog-button-styling
Browse files Browse the repository at this point in the history
fix(Modal): Resolve incorrect use of `ButtonGroup` wrapper
  • Loading branch information
m7kvqbe1 authored May 17, 2021
2 parents 8ed3b75 + aa764fa commit dff5cf0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 38 deletions.
35 changes: 16 additions & 19 deletions packages/react-component-library/src/components/Modal/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from 'react'

import { BUTTON_VARIANT, ButtonProps } from '../Button'
import { StyledButtonGroup } from '../ButtonGroup/partials/StyledButtonGroup'
import { StyledFooter } from './partials/StyledFooter'
import { StyledPrimaryButton } from './partials/StyledPrimaryButton'
import { StyledSecondaryButton } from './partials/StyledSecondaryButton'
Expand Down Expand Up @@ -30,23 +29,21 @@ export const Footer: React.FC<FooterProps> = ({
data-testid="modal-tertiary"
/>
)}
<StyledButtonGroup>
{secondaryButton && (
<StyledSecondaryButton
type="button"
variant={BUTTON_VARIANT.SECONDARY}
{...secondaryButton}
data-testid="modal-secondary"
/>
)}
{primaryButton && (
<StyledPrimaryButton
type="button"
variant={BUTTON_VARIANT.PRIMARY}
{...primaryButton}
data-testid="modal-primary"
/>
)}
</StyledButtonGroup>
{secondaryButton && (
<StyledSecondaryButton
type="button"
variant={BUTTON_VARIANT.SECONDARY}
{...secondaryButton}
data-testid="modal-secondary"
/>
)}
{primaryButton && (
<StyledPrimaryButton
type="button"
variant={BUTTON_VARIANT.PRIMARY}
{...primaryButton}
data-testid="modal-primary"
/>
)}
</StyledFooter>
)

This file was deleted.

0 comments on commit dff5cf0

Please sign in to comment.