Skip to content

Commit

Permalink
refactor: replace fragment with short syntax variant
Browse files Browse the repository at this point in the history
  • Loading branch information
Шараев Айнур Раильевич committed Jun 11, 2021
1 parent 044fbe8 commit df1a363
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/ui/atoms/loader/example.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ export const ExampleDataFetching = () => {
}

return (
<React.Fragment>
<>
<ListContainer variant="primary" style={{ width: '100%' }}>
{data.map(({ id, name }) => (
<ListItem key={id} as="li" text={name} />
))}
</ListContainer>
<Button text="Reset" onClick={reset} />
</React.Fragment>
</>
);
};
4 changes: 2 additions & 2 deletions src/ui/atoms/loader/usage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ Use a `Loader` component whenever the wait time is anticipated to be longer than
<Playground>
<State initial={false} change={(i) => !i}>
{(value, change) => (
<React.Fragment>
<>
<Button text="Toggle loader" onClick={change} />
{value ? (
<div style={{ width: 300 }}>
<Loader description={<Text type="S">Some action in progress...</Text>} />
</div>
) : null}
</React.Fragment>
</>
)}
</State>
</Playground>
Expand Down

0 comments on commit df1a363

Please sign in to comment.