From 253008e66679a847362fb0896895d3208759a704 Mon Sep 17 00:00:00 2001 From: Pierre de La Morinerie Date: Wed, 3 Apr 2019 15:15:35 +0000 Subject: [PATCH] types_de_champ_editor: add title to actions --- .../TypesDeChampEditor/components/MoveButton.js | 10 ++++++++-- .../TypesDeChampEditor/components/TypeDeChamp.js | 8 ++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/app/javascript/components/TypesDeChampEditor/components/MoveButton.js b/app/javascript/components/TypesDeChampEditor/components/MoveButton.js index 5650f9d32..5aa94f983 100644 --- a/app/javascript/components/TypesDeChampEditor/components/MoveButton.js +++ b/app/javascript/components/TypesDeChampEditor/components/MoveButton.js @@ -2,9 +2,14 @@ import React from 'react'; import PropTypes from 'prop-types'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -function MoveButton({ isEnabled, icon, onClick }) { +function MoveButton({ isEnabled, icon, title, onClick }) { return ( - ); @@ -13,6 +18,7 @@ function MoveButton({ isEnabled, icon, onClick }) { MoveButton.propTypes = { isEnabled: PropTypes.bool, icon: PropTypes.string, + title: PropTypes.string, onClick: PropTypes.func }; diff --git a/app/javascript/components/TypesDeChampEditor/components/TypeDeChamp.js b/app/javascript/components/TypesDeChampEditor/components/TypeDeChamp.js index 8d5bc0a4b..9038a1424 100644 --- a/app/javascript/components/TypesDeChampEditor/components/TypeDeChamp.js +++ b/app/javascript/components/TypesDeChampEditor/components/TypeDeChamp.js @@ -78,6 +78,7 @@ const TypeDeChamp = sortableElement( dispatch({ type: 'moveTypeDeChampUp', @@ -88,6 +89,7 @@ const TypeDeChamp = sortableElement( dispatch({ type: 'moveTypeDeChampDown', @@ -162,8 +164,10 @@ TypeDeChamp.propTypes = { }; const DragHandle = sortableHandle(() => ( -
-
+
)); function createUpdateHandler(dispatch, typeDeChamp, field, index, prefix) {