npm install flexing-container
You can get inspired by Example here and Storybook demo here.
import { FlexingContainer } from 'flexing-container'
const MyComponent = () => {
// …
return (
<FlexingContainer
wrap={({ children }) => <div className="box">{children}</div>}
>
{items[activeItemIndex]}
</FlexingContainer>
)
}
Don't forget to import styles from flexing-container/dist/index.css
.
Run npm start
and npm run storybook
parallelly.