mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Clean up todo component properties
This commit is contained in:
parent
4d4ab689f5
commit
3ec41d47ae
3 changed files with 46 additions and 52 deletions
|
@ -1,10 +1,4 @@
|
|||
const TodoSettingsBlock = ( {
|
||||
todos,
|
||||
setTodos,
|
||||
todosData,
|
||||
setTodosData,
|
||||
className = '',
|
||||
} ) => {
|
||||
const TodoSettingsBlock = ( { todosData, className = '' } ) => {
|
||||
if ( todosData.length === 0 ) {
|
||||
return null;
|
||||
}
|
||||
|
@ -14,16 +8,7 @@ const TodoSettingsBlock = ( {
|
|||
className={ `ppcp-r-settings-block__todo ppcp-r-todo-items ${ className }` }
|
||||
>
|
||||
{ todosData.map( ( todo ) => (
|
||||
<TodoItem
|
||||
name="todo_items"
|
||||
key={ todo.value }
|
||||
value={ todo.value }
|
||||
currentValue={ todos }
|
||||
changeCallback={ setTodos }
|
||||
description={ todo.description }
|
||||
changeTodos={ setTodosData }
|
||||
todosData={ todosData }
|
||||
/>
|
||||
<TodoItem key={ todo.id } title={ todo.title } />
|
||||
) ) }
|
||||
</div>
|
||||
);
|
||||
|
@ -35,7 +20,7 @@ const TodoItem = ( props ) => {
|
|||
<div className="ppcp-r-todo-item__inner">
|
||||
<div className="ppcp-r-todo-item__icon"></div>
|
||||
<div className="ppcp-r-todo-item__description">
|
||||
{ props.description }
|
||||
{ props.title }
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue