@react-md/states
Advanced tools
Comparing version 2.7.0 to 2.7.1
@@ -6,2 +6,14 @@ # Change Log | ||
## [2.7.1](https://github.com/mlaursen/react-md/compare/v2.7.0...v2.7.1) (2021-03-23) | ||
### Other Internal Changes | ||
* **ts:** stopped using FC type ([c5daa47](https://github.com/mlaursen/react-md/commit/c5daa47d73516e075c036fd745e7228d7f155a62)) | ||
# [2.7.0](https://github.com/mlaursen/react-md/compare/v2.6.0...v2.7.0) (2021-02-28) | ||
@@ -8,0 +20,0 @@ |
{ | ||
"name": "@react-md/states", | ||
"version": "2.7.0", | ||
"version": "2.7.1", | ||
"description": "A package for adding the different focus, hover, selected, active, etc states to elements", | ||
@@ -38,5 +38,5 @@ "main": "./lib/index.js", | ||
"dependencies": { | ||
"@react-md/theme": "^2.7.0", | ||
"@react-md/transition": "^2.7.0", | ||
"@react-md/utils": "^2.7.0", | ||
"@react-md/theme": "^2.7.1", | ||
"@react-md/transition": "^2.7.1", | ||
"@react-md/utils": "^2.7.1", | ||
"react-transition-group": "^4.4.1" | ||
@@ -57,3 +57,3 @@ }, | ||
}, | ||
"gitHead": "931e81f628b580837df3a97267a42c9880b13815" | ||
"gitHead": "4fb8828b048fd2472096d5f55033cc4a7ba24e1a" | ||
} |
@@ -98,3 +98,3 @@ # @react-md/states | ||
```tsx | ||
import React, { FC, HTMLAttributes } from "react"; | ||
import React, { HTMLAttributes, ReactElement } from "react"; | ||
import { render } from "react-dom"; | ||
@@ -109,3 +109,3 @@ import { | ||
InteractionStatesOptions<HTMLButtonElement>; | ||
const Button: FC<ButtonProps> = ({ | ||
function Button({ | ||
className: propClassName, | ||
@@ -119,3 +119,3 @@ disabled, | ||
...propHandlers | ||
}) => { | ||
}: ButtonProps): ReactElement { | ||
const { ripples, handlers, className } = useInteractionStates({ | ||
@@ -137,15 +137,17 @@ handlers: propHandlers, | ||
); | ||
}; | ||
} | ||
const App = () => ( | ||
<> | ||
<Button>Button 1</Button> | ||
<Button disableRipple>Button 2</Button> | ||
<Button disableRipple disablePressedFallback> | ||
Button 3 | ||
</Button> | ||
</> | ||
); | ||
function App(): ReactElement { | ||
return ( | ||
<> | ||
<Button>Button 1</Button> | ||
<Button disableRipple>Button 2</Button> | ||
<Button disableRipple disablePressedFallback> | ||
Button 3 | ||
</Button> | ||
</> | ||
); | ||
} | ||
render(<App />, document.getElementById("root")); | ||
``` |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
328903
5132
150
Updated@react-md/theme@^2.7.1
Updated@react-md/transition@^2.7.1
Updated@react-md/utils@^2.7.1