Front: Wrap IconButton
This commit is contained in:
committed by
Clément Le Bihan
parent
f788872f9b
commit
7e463662be
@@ -0,0 +1,12 @@
|
||||
import { Box, Button } from "native-base";
|
||||
|
||||
type IconButtonProps = {
|
||||
icon: Parameters<typeof Button>[0]['leftIcon']
|
||||
} & Omit<Parameters<typeof Button>[0], 'leftIcon' | 'rightIcon'>;
|
||||
|
||||
// Wrapper around Button for IconButton as Native's one sucks <3
|
||||
const IconButton = (props: IconButtonProps) => {
|
||||
return <Box><Button {...props} leftIcon={props.icon} width='fit-content' rounded='sm'/></Box>
|
||||
}
|
||||
|
||||
export default IconButton;
|
||||
Reference in New Issue
Block a user