Skip to content

Commit

Permalink
refactor: rename npm package
Browse files Browse the repository at this point in the history
  • Loading branch information
phphe committed Feb 23, 2024
1 parent 0f6076a commit b6dbc97
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 19 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @phphe/react-base-virtual-list ![GitHub License](https://img.shields.io/github/license/phphe/react-base-virtual-list) ![NPM Version](https://img.shields.io/npm/v/@phphe/react-base-virtual-list) ![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/phphe/react-base-virtual-list/build.yml) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/%40phphe%2Freact-base-virtual-list)
# react-base-virtual-list ![GitHub License](https://img.shields.io/github/license/phphe/react-base-virtual-list) ![NPM Version](https://img.shields.io/npm/v/react-base-virtual-list) ![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/phphe/react-base-virtual-list/build.yml) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/react-base-virtual-list)

[中文](README_CN.md)

Expand All @@ -13,15 +13,15 @@ React basic virtual list, supports common features and is easy to customize. [On

## Installation

- npm: `npm install @phphe/react-base-virtual-list`
- yarn: `yarn add @phphe/react-base-virtual-list`
- pnpm: `pnpm add @phphe/react-base-virtual-list`
- npm: `npm install react-base-virtual-list`
- yarn: `yarn add react-base-virtual-list`
- pnpm: `pnpm add react-base-virtual-list`
- CDN: Check [iife](#iife).

## Usage

```tsx
import { VirtualList } from "@phphe/react-base-virtual-list";
import { VirtualList } from "react-base-virtual-list";

export default function BaseExample() {
const exampleData = [
Expand Down Expand Up @@ -90,7 +90,7 @@ First, use `ref` to obtain the exposed object.

```tsx
import { useRef } from "react";
import { VirtualList, VirtualListHandle } from "@phphe/react-base-virtual-list";
import { VirtualList, VirtualListHandle } from "react-base-virtual-list";

export default function BaseExample() {
const ref = useRef<VirtualListHandle>(null);
Expand Down Expand Up @@ -135,8 +135,8 @@ You can host it on your server and then use the `script` tag to include it. Befo

You can also use the following third-party CDN url to include it.

- unpkg: https://unpkg.com/@phphe/react-base-virtual-list
- jsdelivr: https://cdn.jsdelivr.net/npm/@phphe/react-base-virtual-list
- unpkg: https://unpkg.com/react-base-virtual-list
- jsdelivr: https://cdn.jsdelivr.net/npm/react-base-virtual-list

## Development

Expand Down
16 changes: 8 additions & 8 deletions README_CN.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @phphe/react-base-virtual-list ![GitHub License](https://img.shields.io/github/license/phphe/react-base-virtual-list) ![NPM Version](https://img.shields.io/npm/v/@phphe/react-base-virtual-list) ![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/phphe/react-base-virtual-list/build.yml) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/%40phphe%2Freact-base-virtual-list)
# react-base-virtual-list ![GitHub License](https://img.shields.io/github/license/phphe/react-base-virtual-list) ![NPM Version](https://img.shields.io/npm/v/react-base-virtual-list) ![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/phphe/react-base-virtual-list/build.yml) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/%40phphe%2Freact-base-virtual-list)

[English](README.md)

Expand All @@ -13,15 +13,15 @@ React 基础虚拟列表,实现了常用功能并且易于二次开发。[在

## 安装

- npm: `npm install @phphe/react-base-virtual-list`
- yarn: `yarn add @phphe/react-base-virtual-list`
- pnpm: `pnpm add @phphe/react-base-virtual-list`
- npm: `npm install react-base-virtual-list`
- yarn: `yarn add react-base-virtual-list`
- pnpm: `pnpm add react-base-virtual-list`
- CDN: 见 [iife](#iife).

## 使用

```tsx
import { VirtualList } from "@phphe/react-base-virtual-list";
import { VirtualList } from "react-base-virtual-list";

export default function BaseExample() {
const exampleData = [
Expand Down Expand Up @@ -90,7 +90,7 @@ export default function BaseExample() {

```tsx
import { useRef } from "react";
import { VirtualList, VirtualListHandle } from "@phphe/react-base-virtual-list";
import { VirtualList, VirtualListHandle } from "react-base-virtual-list";

export default function BaseExample() {
const ref = useRef<VirtualListHandle>(null);
Expand Down Expand Up @@ -135,8 +135,8 @@ interface VirtualListHandle {

你也可以使用如下第三方 CDN 的地址引入。

- unpkg: https://unpkg.com/@phphe/react-base-virtual-list
- jsdelivr: https://cdn.jsdelivr.net/npm/@phphe/react-base-virtual-list
- unpkg: https://unpkg.com/react-base-virtual-list
- jsdelivr: https://cdn.jsdelivr.net/npm/react-base-virtual-list

## 开发指南

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@phphe/react-base-virtual-list",
"name": "react-base-virtual-list",
"version": "0.0.1-beta.13",
"license": "MIT",
"author": "phphe <phphe@outlook.com> (https://github.com/phphe)",
Expand Down Expand Up @@ -55,4 +55,4 @@
"vite": "^5.0.8",
"vite-plugin-dts": "^3.7.2"
}
}
}
2 changes: 1 addition & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function App() {
return (
<>
<div className='text-center'>
<b>@phphe/react-base-virtual-list</b>
<b>react-base-virtual-list</b>
<a className='ml-10' href="https://github.com/phphe/react-base-virtual-list">Github</a>
</div>
<div className='grid grid-cols-3 gap-4'>
Expand Down

0 comments on commit b6dbc97

Please sign in to comment.