✨ Made Robot component take embed option
This commit is contained in:
parent
103597f1c6
commit
98ce2210e8
3 changed files with 5 additions and 108 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -3,12 +3,13 @@ import PropTypes from "prop-types";
|
|||
import poses from "./poses";
|
||||
|
||||
const Robot = props => {
|
||||
console.log("roboprops", props);
|
||||
return (
|
||||
<svg
|
||||
className={props.className}
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width={props.size}
|
||||
height={props.size}
|
||||
width={props.embed ? "" : props.size}
|
||||
height={props.embed ? "" : props.size}
|
||||
viewBox={props.viewBox}
|
||||
>
|
||||
<path
|
||||
|
@ -23,7 +24,8 @@ const Robot = props => {
|
|||
Robot.propTypes = {
|
||||
size: PropTypes.number,
|
||||
viewBox: PropTypes.string,
|
||||
pose: PropTypes.string
|
||||
pose: PropTypes.string,
|
||||
embed: PropTypes.bool
|
||||
};
|
||||
|
||||
Robot.defaultProps = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue