react-anime-tab
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

react-anime-tab

GitHub license code style: prettier

example

import React, { Key, useState } from "react";
import "@/style/global.css";
import { Tabs } from "@source/index";

function App() {
  const [selectedKeys, setSelectedKeys] = useState<Key[]>([]);

  return (
    <Tabs
      items={new Array(10).fill(null).map((_, idx) => ({
        name: "item" + idx,
        id: "item" + idx,
        icon: <div style={{ marginRight: "8px" }}>1</div>,
      }))}
      defaultSelectedKeys={["item0"]}
      style={{ height: "60px" }}
      itemStyle={{ padding: "0px 12px" }}
      itemSelectedStyle={{ padding: "0px 12px", color: "red" }}
      lineStyle={{ background: "red" }}
      // selectedKeys={selectedKeys}
      // onSelect={(id, item) => {
      //   setSelectedKeys([...selectedKeys, id]);
      // }}
    />
  );
}

export default App;

Readme

Keywords

none

Package Sidebar

Install

npm i react-anime-tab

Weekly Downloads

1

Version

0.1.2

License

ISC

Unpacked Size

40.4 kB

Total Files

44

Last publish

Collaborators

  • tohsaka888