m3-ripple 0.0.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +23 -0
  2. package/bunfig.toml +2 -0
  3. package/package.json +4 -4
package/README.md CHANGED
@@ -57,6 +57,29 @@ function Demo() {
57
57
  }
58
58
  ```
59
59
 
60
+ ## CSS Variable
61
+ You can set global CSS variables to customize the ripple opacity for hover and pressed states.
62
+
63
+ ```css
64
+ :root {
65
+ --ripple-hover-opacity: 0.08;
66
+ --ripple-pressed-opacity: 0.12;
67
+ }
68
+ ```
69
+
70
+ Otherwise, you can set the opacity using the `hoverOpacity` and `pressedOpacity` props.
71
+
72
+ ```jsx
73
+ import { Ripple } from 'm3-ripple'
74
+ import 'm3-ripple/ripple.css'
75
+
76
+ function Demo() {
77
+ return (
78
+ <Ripple hoverOpacity={0.1} pressedOpacity={0.15} />
79
+ )
80
+ }
81
+ ```
82
+
60
83
  ## Props
61
84
  Here's a type definition of the props you can use with the `Ripple` component:
62
85
 
package/bunfig.toml ADDED
@@ -0,0 +1,2 @@
1
+ [install]
2
+ registry = "https://registry.npmjs.org/"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "m3-ripple",
3
- "version": "0.0.0",
3
+ "version": "1.0.0",
4
4
  "description": "React TypeScript implementation of Material Design 3 Ripple component",
5
5
  "type": "module",
6
6
  "author": {
@@ -45,10 +45,10 @@
45
45
  },
46
46
  "repository": {
47
47
  "type": "git",
48
- "url": "https://github.com/saltyaom/m3-ripple"
48
+ "url": "https://github.com/SaltyAom/m3-ripple"
49
49
  },
50
- "bugs": "https://github.com/saltyaom/m3-ripple/issues",
51
- "homepage": "https://github.com/saltyaom/m3-ripple",
50
+ "bugs": "https://github.com/SaltyAom/m3-ripple/issues",
51
+ "homepage": "https://github.com/SaltyAom/m3-ripple",
52
52
  "keywords": [
53
53
  "react",
54
54
  "ripple",