devcontainer, fix react-spring

This commit is contained in:
2021-03-13 17:57:21 +00:00
parent f96bb50879
commit 7012400a8e
8 changed files with 107 additions and 2459 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -90,12 +90,13 @@ export default function ListActions({
restSpeedThreshold: 0.5,
restDisplacementThreshold: 0.5,
}}
items={actions}
keys={actions.map((action) => action({}).key)}
from={{ opacity: 0, height: 0, margin: 0, padding: 0 }}
enter={{ opacity: 1, height: 30, margin: 0, padding: 0 }}
leave={{ opacity: 0, height: 0, margin: 0, padding: 0 }}
>
{actions}
{action => action}
</Transition>
</div>
);

View File

@@ -42,7 +42,7 @@ export default function TodosContainer({
pointerEvents: "none",
}}
>
{todos.map((todo) => (styles) => (
{todo => (styles) => (
<Todo
key={todo.id}
todo={todo}
@@ -51,7 +51,7 @@ export default function TodosContainer({
removeTodo={() => removeTodo(todo.id)}
editTodo={(text) => editTodo(todo.id, text)}
/>
))}
)}
</Transition>
</ul>
);

View File

@@ -20,16 +20,18 @@ class Todos extends React.PureComponent {
from={{ opacity: 0, maxHeight: 0 }}
enter={{ opacity: 1, maxHeight: 38 }}
leave={{ opacity: 0, maxHeight: 0 }}
items={list}
>
{list && ((styles) => <Input styles={styles} />)}
{list => list && ((styles) => <Input styles={styles} />)}
</Transition>
<TodoListContainer />
<Transition
from={{ opacity: 0, maxHeight: 0 }}
enter={{ opacity: 1, maxHeight: 32 }}
leave={{ opacity: 0, maxHeight: 0 }}
items={list}
>
{list && Filters}
{list => list && Filters}
</Transition>
</div>
);