### Горизонтальное отображение с переполнением
```tsx
import React from 'react';
import { Flow } from '@salutejs/plasma-web';
export function App() {
const numbers = ['one', 'two', 'three', 'four', 'five', 'six'];
const style = (index) => ({
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
width: `${2 + numbers[index].length}ch`,
height: '25px',
backgroundColor: '#999',
borderRadius: '10px',
});
return (
{Array(6)
.fill(0)
.map((_, i) => ({numbers[i]}
))}
);
}
```
### Вертикальное отображение с переполнением
```tsx
import React from 'react';
import { Flow } from '@salutejs/plasma-web';
export function App() {
const numbers = ['one', 'two', 'three', 'four', 'five', 'six'];
const style = (index) => ({
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
width: `${2 + numbers[index].length}ch`,
height: '25px',
backgroundColor: '#999',
borderRadius: '10px',
});
return (
{Array(6)
.fill(0)
.map((_, i) => ({numbers[i]}
))}
);
}
```
### Отображение с разбиением на строки С ограничением количества элементов в строке.
```tsx
import React from 'react';
import { Flow } from '@salutejs/plasma-web';
export function App() {
const numbers = ['one', 'two', 'three', 'four', 'five', 'six'];
const style = (index) => ({
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
width: `${2 + numbers[index].length}ch`,
height: '25px',
backgroundColor: '#999',
borderRadius: '10px',
});
return (
{Array(6)
.fill(0)
.map((_, i) => ({numbers[i]}
))}
);
}
```