2021-11-23 05:16:50 +00:00
|
|
|
import { PropsWithChildren } from 'react';
|
|
|
|
|
|
|
|
import { useInputGroupContext } from './InputGroup';
|
|
|
|
|
2023-09-04 18:07:29 +00:00
|
|
|
/**
|
|
|
|
* Should wrap all buttons inside a InputGroup
|
|
|
|
*
|
|
|
|
* example:
|
|
|
|
* ```
|
|
|
|
* <InputGroup>
|
|
|
|
* <InputGroup.ButtonWrapper>
|
|
|
|
* <Button>...</Button>
|
|
|
|
* <Button>...</Button>
|
|
|
|
* </InputGroup.ButtonWrapper>
|
|
|
|
* </InputGroup>
|
|
|
|
* ```
|
|
|
|
*/
|
2021-11-23 05:16:50 +00:00
|
|
|
export function InputGroupButtonWrapper({
|
|
|
|
children,
|
|
|
|
}: PropsWithChildren<unknown>) {
|
|
|
|
useInputGroupContext();
|
|
|
|
|
2023-09-04 18:07:29 +00:00
|
|
|
return <span className="input-group-btn">{children}</span>;
|
2021-11-23 05:16:50 +00:00
|
|
|
}
|