0.4.4 • Published 7 months ago

@telewebion/ui-component v0.4.4

Weekly downloads
-
License
-
Repository
-
Last release
7 months ago

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 NameTypeDefaultDescription
icon*string-Required. Specifies the name of the icon to display (e.g., home). Icons list are here.
solidboolfalseIf true, the icon will use the solid variant.
sizenumber-Specifies the size of the icon (in pixels).
spinboolfalseIf true, the icon will spin continuously.
reverseboolfalseIf true and spin is enabled, spins the icon in the reverse direction.

Icons

NameIconNameIconNameIcon
alert-circleIMDBhome
archive-solidarchiveinstagram
bookmark-solidarrow-up-leftlinkedin
dots-grid-solidbalelocation
download-solidbookmarkmenu
home-solidchevron-downplay
live-solidchevron-leftplus
play-solidchevron-rightsearch
search-solidchevron-selectorshare
thumbs-down-solidchevron-uptelephone
thumbs-up-soliddownloadthumbs-down
x-close-solidemailthumbs-up
filter-linesupload-clouduser
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.

0.4.4

7 months ago

0.4.3

7 months ago

0.4.2

7 months ago

0.4.1

8 months ago

0.4.0

8 months ago

0.3.0

8 months ago

0.3.2

8 months ago

0.3.1

8 months ago

0.2.0

10 months ago

0.1.8

1 year ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.0

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.0.73

2 years ago

0.0.74

2 years ago

0.0.70

2 years ago

0.0.71

2 years ago

0.0.69

2 years ago

0.0.72

2 years ago

0.0.62

2 years ago

0.0.63

2 years ago

0.0.64

2 years ago

0.0.65

2 years ago

0.0.66

2 years ago

0.0.67

2 years ago

0.0.68

2 years ago

0.0.60

2 years ago

0.0.61

2 years ago

0.0.59

2 years ago

0.0.51

2 years ago

0.0.52

2 years ago

0.0.53

2 years ago

0.0.54

2 years ago

0.0.55

2 years ago

0.0.56

2 years ago

0.0.57

2 years ago

0.0.58

2 years ago

0.0.50

2 years ago

0.0.42

2 years ago

0.0.40

2 years ago

0.0.41

2 years ago

0.0.38

2 years ago

0.0.39

2 years ago

0.0.32

2 years ago

0.0.33

2 years ago

0.0.34

2 years ago

0.0.35

2 years ago

0.0.36

2 years ago

0.0.24

3 years ago

0.0.25

2 years ago

0.0.30

2 years ago

0.0.31

2 years ago

0.0.26

2 years ago

0.0.27

2 years ago

0.0.28

2 years ago

0.0.29

2 years ago

0.0.23

3 years ago

0.0.22

3 years ago

0.0.21

3 years ago

0.0.20

3 years ago

0.0.19

3 years ago

0.0.18

3 years ago

0.0.17

3 years ago

0.0.14

3 years ago

0.0.13

3 years ago

0.0.12

3 years ago

0.0.11

3 years ago

0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago