npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@tangbin/theme

v1.0.0

Published

临时主题库

Downloads

2

Readme

@tangbin/theme

临时主题库

TODO: 建立一套类似于 Element UI 的主题库功能

Install

# npm
npm install --save @tangbin/theme

# yarn
yarn add @tangbin/theme

Usage

主题库正在建设中,目前只有 light 系的主题

// 引入样式
import '@tangbin/theme/dist/light/normalize.less';
import '@tangbin/theme/dist/light/ant-design/index.less';
// 使用变量
import '@tangbin/theme/dist/light/variables.less';
import '@tangbin/theme/dist/light/ant-design/variables.less';

.test {
  font-size: @font-size-12;
}

Docs

示例

通用样式

<div class="title">...</div>

Modal + Form(ant design 的弹出框+表单提交)

import React, { FC } from 'react';
import { Modal, Button, Form, Input, Select } from 'antd';

const { Item } = Form;
const { TextArea } = Input;
const { Option } = Select;

const Index: FC = () => {
  const [form] = Form.useForm();

  return (
    <>
      // 请使用centered属性和600的宽度
      <Modal centered width={600} title="单列表单测试">
        <Form layout="vertical" form={form}>
          <Item label="test1" name="test1">
            <Input />
          </Item>
          <Item label="test1" name="test1">
            <Input />
          </Item>
          <Item label="test1" name="test1">
            <Input />
          </Item>
        </Form>
      </Modal>
      // 请使用centered属性、width=740 & className=ant-modal-two-cols
      <Modal centered width={740} title="2列表单测试" className="ant-modal-two-cols">
        <Form layout="vertical" form={form}>
          <Item label="test1" name="test1">
            <Input />
          </Item>
          <Item label="test1" name="test1">
            <Input />
          </Item>
          <Item label="test1" name="test1">
            <TextArea />
          </Item>
          // 如果出现需要独占一行的元素,如TextArea,则需要使用空白占位元素进行填充
          <Item className="hidden" />
          <Item label="test1" name="test1">
            <Input />
          </Item>
        </Form>
      </Modal>
      // 请使用centered属性、width=1100 & className=ant-modal-three-cols
      <Modal centered width={1100} title="3列表单测试" className="ant-modal-three-cols">
        <Form layout="vertical" form={form}>
          <Item label="test1" name="test1">
            <Input />
          </Item>
          <Item label="test1" name="test1">
            <Input />
          </Item>
          <Item label="test1" name="test1">
            <TextArea />
          </Item>
          // 如果出现需要独占一行的元素,如TextArea,则需要使用空白占位元素进行填充
          <Item className="hidden" />
          <Item className="hidden" />
          <Item label="test1" name="test1">
            <Input />
          </Item>
        </Form>
      </Modal>
    </>
  );
};

export default Index;