File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import {
1414 __experimentalText as Text ,
1515 PanelBody ,
1616 Button ,
17+ SelectControl ,
1718 TextControl ,
1819 TextareaControl ,
1920} from '@wordpress/components' ;
@@ -28,6 +29,9 @@ import {
2829 createClonedTheme ,
2930 createChildTheme ,
3031} from '../resolvers' ;
32+ import { generateWpVersions } from '../utils/generate-versions' ;
33+
34+ const WP_MINIMUM_VERSIONS = generateWpVersions ( WP_VERSION ) ; // eslint-disable-line no-undef
3135
3236export const CreateThemePanel = ( { createType } ) => {
3337 const { createErrorNotice } = useDispatch ( noticesStore ) ;
@@ -47,6 +51,7 @@ export const CreateThemePanel = ( { createType } ) => {
4751 author : '' ,
4852 author_uri : '' ,
4953 tags_custom : '' ,
54+ requires_wp : '' ,
5055 subfolder,
5156 } ) ;
5257
@@ -195,6 +200,20 @@ export const CreateThemePanel = ( { createType } ) => {
195200 'create-block-theme'
196201 ) }
197202 />
203+ < SelectControl
204+ label = { __ (
205+ 'Minimum WordPress version' ,
206+ 'create-block-theme'
207+ ) }
208+ value = { theme . requires_wp }
209+ options = { WP_MINIMUM_VERSIONS . map ( ( version ) => ( {
210+ label : version ,
211+ value : version ,
212+ } ) ) }
213+ onChange = { ( value ) => {
214+ setTheme ( { ...theme , requires_wp : value } ) ;
215+ } }
216+ />
198217 </ details >
199218 < br />
200219 { createType === 'createClone' && (
You can’t perform that action at this time.
0 commit comments