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

@telewebion/ui-component

v0.4.4

Published

> The ui components made with styled-components.

Downloads

573

Readme

UI Component

The ui components made with styled-components.

tech

  • swiper - using swiper in slider component

Installation

You can install all ui components with...

$ npm install --save @telewebion/ui-component

or

$ yarn add @telewebion/ui-component

Usage

Style

To import icons font :

import "@telewebion/ui-component/tw-ui-style.css";

Component

To see which components are available take a look at the components section.

// whatever components you need
import { Button } from "@telewebion/ui-component";

export const myComponent = (props) => <Button>Hello, World!</Button>;
  • Button Component
  • Card Component
  • Divider Component
  • Grid Component
  • Icon Component
  • Ratio Component
  • Skeleton Component
  • Slider Component
  • Typography Component

Icon

Usage

You can import the Icon component and use it as follows:

import { Icon } from "@telewebion/ui-component";

function App() {
  return (
    <div>
      <Icon icon="home" size={24} spin />
      <Icon icon="user" solid size={30} />
    </div>
  );
}

export default App;

Props

The Icon component accepts the following props:

| Prop Name | Type | Default | Description | | --------- | -------- | :-----: | ------------------------------------------------------------------------------------------------------ | | icon* | string | - | Required. Specifies the name of the icon to display (e.g., home). Icons list are here. | | solid | bool | false | If true, the icon will use the solid variant. | | size | number | - | Specifies the size of the icon (in pixels). | | spin | bool | false | If true, the icon will spin continuously. | | reverse | bool | false | If true and spin is enabled, spins the icon in the reverse direction. |

Icons

| Name | Icon | Name | Icon | Name | Icon | | ------------------- | --------------------------------------------------- | ------------------ | ---------------------------------------------------------- | ------------- | -------------------------------------------- | | alert-circle | | IMDB | | home | | | archive-solid | | archive | | instagram | | | bookmark-solid | | arrow-up-left | | linkedin | | | dots-grid-solid | | bale | | location | | | download-solid | | bookmark | | menu | | | home-solid | | chevron-down | | play | | | live-solid | | chevron-left | | plus | | | play-solid | | chevron-right | | search | | | search-solid | | chevron-selector | | share | | | thumbs-down-solid | | chevron-up | | telephone | | | thumbs-up-solid | | download | | thumbs-down | | | x-close-solid | | email | | thumbs-up | | | filter-lines | | upload-cloud | | user | | | x-close | | | | | |

Tool

Tools for style-components are in tools section.

import { prop } from "@telewebion/ui-component/tool";
  • media
  • prop
  • ifProp
  • ifNotProp
  • switchProp
  • them
  • withProp

Conventions

Updating Icons

We use the IcoMoon website to create and manage our font icons. To add more icons to the project, please follow these steps:

  1. Access IcoMoon: Go to the IcoMoon and import the selection.json file located in src/assets/selection.json. You can do this by using the Import Icons button in IcoMoon to load the current state of our icons.

  2. Select Icon Sets: There are two sets of icons available one for line icons and another for solid icons. Depending on your needs, add your desired icons to the appropriate set. After adding the icons, sort them within each set using the Rearrange Icons option in the sets configuration menu (This helps maintain consistency across updates).

  3. Generate and Update: Once you have arranged your icons, navigate to the Generate tab and increase the version of tw-icon, and download the font pack. At this point, replace the following files:

    • Update selection.json located in src/assets/selection.json with the new version.
    • Replace the font files (tw-icon.[eot, svg, ttf, woff]) in the public/fonts/* directory.
    • Modify font-icon.css in src/assets/font-icon.css to reflect the changes.

Following these steps will ensure that our icon set is up to date.