Button.js
765 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import React from 'react';
import styled from 'styled-components';
import { Button } from '@mantine/core';
const ButtonBlock = styled.div`
width: ${props => props.width || '80px'};
font-size: ${props => props.fontsize || '15px'};
float: ${props => props.float || ''};
border-radius: 0.3em;
cursor: pointer;
`;
const Buttons = ({
children,
size = 'lg',
color,
float,
width,
fontsize,
icon = '',
onClick,
}) => {
return (
<ButtonBlock float={float} width={width} fontsize={fontsize}>
<Button
onClick={onClick}
size={size}
color={color || 'blue'}
rightIcon={icon}
>
{children}
</Button>
</ButtonBlock>
);
};
export default Buttons;