Skip to content

Commit

Permalink
fix: ts 自动引入优化
Browse files Browse the repository at this point in the history
  • Loading branch information
HoPGoldy committed Dec 5, 2024
1 parent 272ea8a commit cd49e5e
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 20 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# react-blurry-gradient

![NPM Version](https://img.shields.io/npm/v/react-blurry-gradient)
![npm bundle size](https://img.shields.io/bundlephobia/minzip/react-blurry-gradient)
![NPM License](https://img.shields.io/npm/l/react-blurry-gradient)
![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/HoPGoldy/react-blurry-gradient/release.yml)
![Static Badge](https://img.shields.io/badge/with-typescript-blue)

![](./assert/banner.gif)

实现动态毛玻璃渐变背景特效的 React 组件。
Expand Down Expand Up @@ -42,6 +48,8 @@ export default function App() {

### 2. 随机范围配置

无论使用 `colors` 还是 `items` 配置,都可以使用以下参数来随机生成那些没有指定的属性。

| 参数 | 类型 | 必填 | 默认值 | 说明 |
| -------------- | ------------------ | ---- | ---------- | ------------------------------------ |
| itemWidth | `[number, number]` || `[60, 80]` | 随机生成的色块宽度上下限 |
Expand Down
9 changes: 1 addition & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "react-blurry-gradient",
"description": "A React component that creates blurry gradient effect.",
"private": false,
"version": "1.0.0",
"version": "1.0.1",
"homepage": "https://github.com/HoPGoldy/react-blurry-gradient",
"repository": {
"type": "git",
Expand All @@ -19,13 +19,6 @@
},
"./style.css": "./dist/react-blurry-gradient.css"
},
"typesVersions": {
"*": {
".": [
"./dist/index.d.ts"
]
}
},
"files": [
"dist/*"
],
Expand Down
23 changes: 12 additions & 11 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/blurry-gradient/blurry-gradient.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export const BlurryGradient: FC<BlurryGradientProps> = (props) => {

return (
<div
className={`${props.className} blurry-gradient-container`}
className={['blurry-gradient-container', props.className].filter(Boolean).join(' ')}
style={
{
...(props.style || {}),
Expand Down

0 comments on commit cd49e5e

Please sign in to comment.