PluginProbe
WP Ultimate Post Grid / 4.1.1
WP Ultimate Post Grid v4.1.1
4.1.1 trunk 1.5 1.6 1.7 1.7.1 1.7.2 1.8 1.9 2.0 2.1 2.2 2.3 2.4.0 2.5.0 2.6.0 2.7.0 2.8.0 2.8.2 3.0.0 3.3.0 3.4.0 3.5.0 3.6.0 3.7.0 All 32 releases
wp-ultimate-post-grid / assets / js / admin-template / menu / properties / Number.js

Number.js in WP Ultimate Post Grid 4.1.1, at assets/js/admin-template/menu/properties/Number.js

27 lines 825 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import React, { Fragment } from 'react';
2
3 const PropertyNumber= (props) => {
4 const suffix = props.property.hasOwnProperty('suffix') ? props.property.suffix : '';
5 const value = suffix ? props.value.replace(suffix, '') : props.value;
6
7 return (
8 <Fragment>
9 <input
10 className="wpupg-template-property-input"
11 type="number"
12 value={value}
13 onChange={(e) => {
14 const newValue = `${e.target.value}${suffix}`;
15 return props.onValueChange(newValue);
16 }}
17 />
18 {
19 suffix
20 &&
21 <span className="wpupg-template-property-number-suffix"> { suffix }</span>
22 }
23 </Fragment>
24 );
25 }
26
27 export default PropertyNumber;