@superlogica/button
Advanced tools
Comparing version 0.0.6 to 0.0.7
@@ -7,5 +7,15 @@ import styled from 'styled-components'; | ||
import ButtonGradient from "./props/gradient"; | ||
import PropTypes from 'prop-types'; | ||
const checkType = (type) => { | ||
const regex = /^(outline|solid|ghost)$/; | ||
if(regex.test(type)){ | ||
return type; | ||
} | ||
return 'solid'; | ||
} | ||
const Button = styled.button.attrs(props => ({ | ||
disabled: props.disable, | ||
type: checkType(props.type) | ||
}))` | ||
@@ -43,2 +53,10 @@ position:relative; | ||
Button.propTypes = { | ||
size: PropTypes.string, | ||
type: PropTypes.string, | ||
fullWidth: PropTypes.bool, | ||
shadow: PropTypes.bool, | ||
gradient: PropTypes.string | ||
} | ||
export default Button; |
{ | ||
"name": "@superlogica/button", | ||
"version": "0.0.6", | ||
"description": "Button - DS Superlogica", | ||
"version": "0.0.7", | ||
"description": "Button - DSweb Superlogica", | ||
"main": "Button.js", | ||
@@ -10,6 +10,7 @@ "scripts": { | ||
"dependencies": { | ||
"@superlogica/superlogica-core": "^1.0.1" | ||
"@superlogica/superlogica-core": "^1.0.1", | ||
"prop-types": "^15.7.2" | ||
}, | ||
"author": "Superlogica", | ||
"license": "ISC" | ||
"author": "TOpe - Superlogica", | ||
"license": "MIT" | ||
} |
@@ -8,3 +8,3 @@ import Size from "../resources/size"; | ||
size = 'medium'; | ||
} | ||
} | ||
@@ -11,0 +11,0 @@ return ` |
@@ -23,2 +23,5 @@ import Colors from "@superlogica/superlogica-core/resources/color"; | ||
} | ||
& svg { | ||
fill: ${color} | ||
} | ||
`; | ||
@@ -36,2 +39,8 @@ } | ||
} | ||
& svg { | ||
fill: ${color} | ||
} | ||
&:hover svg { | ||
fill: ${fontColor(color)} | ||
} | ||
`; | ||
@@ -51,2 +60,5 @@ } | ||
} | ||
& svg { | ||
fill: ${fontColor(color)} | ||
} | ||
`; | ||
@@ -63,2 +75,5 @@ } | ||
color: ${Colors.neutral900} !important; | ||
& svg { | ||
fill: ${Colors.neutral900} !important; | ||
} | ||
} | ||
@@ -65,0 +80,0 @@ `; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11716
304
39
2
+ Addedprop-types@^15.7.2