🔥 Clean up ControlButton

This commit is contained in:
Philipp Stracker 2025-01-23 13:24:46 +01:00
parent 420437d55a
commit b9df4d06a4
No known key found for this signature in database

View file

@ -1,28 +1,18 @@
import { Button } from '@wordpress/components';
import SettingsBlock from '../SettingsBlock';
import { Action } from '../Elements';
const ControlButton = ( {
title,
description,
type = 'secondary',
isBusy,
onClick,
buttonLabel,
} ) => (
<SettingsBlock
title={ title }
headerDescription={ description }
horizontalLayout={ true }
className="ppcp--button-block"
>
<Action>
<Button isBusy={ isBusy } variant={ type } onClick={ onClick }>
{ buttonLabel }
</Button>
</Action>
</SettingsBlock>
<Action>
<Button isBusy={ isBusy } variant={ type } onClick={ onClick }>
{ buttonLabel }
</Button>
</Action>
);
export default ControlButton;