p5.js-web-editor/client/components/mobile/IconButton.jsx
2020-06-29 19:54:48 -03:00

24 lines
484 B
JavaScript

import React from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';
import Button from '../../common/Button';
const ButtonWrapper = styled(Button)`
width: 3rem;
> svg {
width: 100%;
height: 100%;
}
`;
const IconButton = props => (<ButtonWrapper
iconBefore={props.children}
kind={Button.kinds.inline}
{...{ ...props, children: null }}
/>);
IconButton.propTypes = {
children: PropTypes.element.isRequired
};
export default IconButton;