@@ -3,6 +3,7 @@ import classnames from 'classnames'
33import { __ } from '@wordpress/i18n'
44import { isLicensed } from '../../utils/screen'
55import { isCondition } from '../../utils/snippets/snippets'
6+ import { Badge } from '../common/Badge'
67import { Button } from '../common/Button'
78import { useSnippetForm } from '../../hooks/useSnippetForm'
89import type { Dispatch , SetStateAction } from 'react'
@@ -17,24 +18,20 @@ export const ConditionModalButton: React.FC<ConditionModalButtonProps> = ({ setI
1718 const hasCondition = 0 !== snippet . conditionId
1819
1920 return (
20- < div className = { classnames ( 'conditions-editor-open' , hasCondition ? 'has-condition' : 'no-condition' ) } >
21+ < div className = { classnames ( 'conditions-editor-open block-form-field ' , hasCondition ? 'has-condition' : 'no-condition' ) } >
2122 { isCondition ( snippet ) ? null
2223 : < >
23- < h3 > { __ ( 'Conditions' , 'code-snippets' ) } </ h3 >
24+ < h4 >
25+ { __ ( 'Conditions' , 'code-snippets' ) }
26+ < Badge name = "beta" small > { __ ( 'beta' , 'code-snippets' ) } </ Badge >
27+ { ! isLicensed ( ) && < Badge name = "pro" small > { __ ( 'Pro' , 'code-snippets' ) } </ Badge > }
28+ </ h4 >
2429
25- < Button
26- large
27- primary = { hasCondition }
28- disabled = { isReadOnly }
29- onClick = { ( ) => setIsDialogOpen ( true ) }
30- >
31- < span className = "dashicons dashicons-randomize" > </ span >
30+ < Button large disabled = { isReadOnly } onClick = { ( ) => setIsDialogOpen ( true ) } >
31+ < Badge name = "cond" small />
3232 { hasCondition
33- ? __ ( 'Conditions' , 'code-snippets' )
34- : __ ( 'Set Conditions' , 'code-snippets' ) }
35-
36- < span className = "badge beta-badge small-badge" > { __ ( 'beta' , 'code-snippets' ) } </ span >
37- { ! isLicensed ( ) && < span className = "badge pro-badge small-badge" > { __ ( 'Pro' , 'code-snippets' ) } </ span > }
33+ ? __ ( 'Edit Conditions' , 'code-snippets' )
34+ : __ ( 'Add Conditions' , 'code-snippets' ) }
3835 </ Button >
3936 </ > }
4037 </ div >
0 commit comments