1 | "use client";
|
2 |
|
3 | import * as React from 'react';
|
4 | import { SpaceContext } from './context';
|
5 | const Item = _ref => {
|
6 | let {
|
7 | className,
|
8 | index,
|
9 | children,
|
10 | split,
|
11 | style
|
12 | } = _ref;
|
13 | const {
|
14 | latestIndex
|
15 | } = React.useContext(SpaceContext);
|
16 | if (children === null || children === undefined) {
|
17 | return null;
|
18 | }
|
19 | return React.createElement(React.Fragment, null, React.createElement("div", {
|
20 | className: className,
|
21 | style: style
|
22 | }, children), index < latestIndex && split && React.createElement("span", {
|
23 | className: `${className}-split`
|
24 | }, split));
|
25 | };
|
26 | export default Item; |
\ | No newline at end of file |