PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.16.0
GiveWP – Donation Plugin and Fundraising Platform v4.16.0
4.18.0 4.17.0 4.16.9 4.16.8.1 4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 All 257 releases
give / src / DonorDashboards / resources / js / app / components / text-control / index.js

index.js in GiveWP – Donation Plugin and Fundraising Platform 4.16.0, at src/DonorDashboards/resources/js/app/components/text-control/index.js

25 lines 827 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
2 import {toUniqueId} from '../../utils';
3
4 import './style.scss';
5
6 const TextControl = ({label = null, value = '', onChange = null, icon = null, type = 'text'}) => {
7 const id = toUniqueId(label);
8
9 return (
10 <div className="give-donor-dashboard-text-control">
11 {label && (
12 <label className="give-donor-dashboard-text-control__label" htmlFor={id}>
13 {label}
14 </label>
15 )}
16 <div className="give-donor-dashboard-text-control__input">
17 {icon && <FontAwesomeIcon icon={icon} />}
18 <input id={id} type={type} value={value} onChange={(evt) => onChange(evt.target.value)} />
19 </div>
20 </div>
21 );
22 };
23
24 export default TextControl;
25