Просмотр исходного кода

refactor PageTagForm -> TagsInput

Yuki Takei 7 лет назад
Родитель
Сommit
90e4fd6811

+ 2 - 2
src/client/js/components/Page/TagEditor.jsx

@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
 import * as toastr from 'toastr';
 import Button from 'react-bootstrap/es/Button';
 import Modal from 'react-bootstrap/es/Modal';
-import PageTagForm from '../PageTagForm';
+import TagsInput from './TagsInput';
 
 class TagEditor extends React.Component {
 
@@ -89,7 +89,7 @@ class TagEditor extends React.Component {
           <Modal.Title className="text-white">Edit Tags</Modal.Title>
         </Modal.Header>
         <Modal.Body>
-          <PageTagForm crowi={this.props.crowi} tags={this.state.tags} onTagsUpdated={this.onTagsUpdatedByFormHandler} />
+          <TagsInput crowi={this.props.crowi} tags={this.state.tags} onTagsUpdated={this.onTagsUpdatedByFormHandler} />
         </Modal.Body>
         <Modal.Footer>
           <Button variant="primary" onClick={this.handleSubmit}>

+ 4 - 4
src/client/js/components/PageTagForm.jsx → src/client/js/components/Page/TagsInput.jsx

@@ -7,11 +7,11 @@ import { AsyncTypeahead } from 'react-bootstrap-typeahead';
  * @author Yuki Takei <yuki@weseek.co.jp>
  *
  * @export
- * @class PageTagForm
+ * @class TagsInput
  * @extends {React.Component}
  */
 
-export default class PageTagForm extends React.Component {
+export default class TagsInput extends React.Component {
 
   constructor(props) {
     super(props);
@@ -83,11 +83,11 @@ export default class PageTagForm extends React.Component {
 
 }
 
-PageTagForm.propTypes = {
+TagsInput.propTypes = {
   crowi: PropTypes.object.isRequired,
   tags: PropTypes.array.isRequired,
   onTagsUpdated: PropTypes.func.isRequired,
 };
 
-PageTagForm.defaultProps = {
+TagsInput.defaultProps = {
 };