1
0
mirror of https://github.com/flarum/core.git synced 2025-07-17 06:41:21 +02:00

feat: use ColorPreviewInput in the EditTagModal (#157)

This commit is contained in:
Rafał Całka
2022-02-02 20:02:20 +01:00
committed by GitHub
parent 08aec419d2
commit eed25d18cb

View File

@@ -1,8 +1,10 @@
import Modal from 'flarum/components/Modal'; import app from 'flarum/admin/app';
import Button from 'flarum/components/Button'; import Modal from 'flarum/common/components/Modal';
import ItemList from 'flarum/utils/ItemList'; import Button from 'flarum/common/components/Button';
import { slug } from 'flarum/utils/string'; import ColorPreviewInput from 'flarum/common/components/ColorPreviewInput';
import Stream from 'flarum/utils/Stream'; import ItemList from 'flarum/common/utils/ItemList';
import { slug } from 'flarum/common/utils/string';
import Stream from 'flarum/common/utils/Stream';
import tagLabel from '../../common/helpers/tagLabel'; import tagLabel from '../../common/helpers/tagLabel';
@@ -68,7 +70,7 @@ export default class EditTagModal extends Modal {
items.add('color', <div className="Form-group"> items.add('color', <div className="Form-group">
<label>{app.translator.trans('flarum-tags.admin.edit_tag.color_label')}</label> <label>{app.translator.trans('flarum-tags.admin.edit_tag.color_label')}</label>
<input className="FormControl" placeholder="#aaaaaa" bidi={this.color} /> <ColorPreviewInput className="FormControl" placeholder="#aaaaaa" bidi={this.color} />
</div>, 20); </div>, 20);
items.add('icon', <div className="Form-group"> items.add('icon', <div className="Form-group">