1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-19 21:39:40 +02:00
portainer/app/react/components/form-components/InputGroup/InputGroupButtonWrapper.tsx

24 lines
508 B
TypeScript

import { PropsWithChildren } from 'react';
import { useInputGroupContext } from './InputGroup';
/**
* Should wrap all buttons inside a InputGroup
*
* example:
* ```
* <InputGroup>
* <InputGroup.ButtonWrapper>
* <Button>...</Button>
* <Button>...</Button>
* </InputGroup.ButtonWrapper>
* </InputGroup>
* ```
*/
export function InputGroupButtonWrapper({
children,
}: PropsWithChildren<unknown>) {
useInputGroupContext();
return <span className="input-group-btn">{children}</span>;
}