5.0.0 • Published 8 years ago

cf-component-icon v5.0.0

Weekly downloads
140
License
BSD-3-Clause
Repository
-
Last release
8 years ago

cf-component-icon

Cloudflare Icon Component

Installation

Installation with yarn is recommended

$ yarn add cf-component-icon

Usage

import React from 'react';
import { Icon } from 'cf-component-icon';

import { createComponent } from 'cf-style-container';

const ColorWrapper = createComponent(
  () => ({
    backgroundColor: '#f1f1f1',
    paddingTop: '10px',
    paddingBottom: '10px',
    paddingLeft: '15px',
    maxWidth: 750,
    display: 'block'
  }),
  'span'
);
ColorWrapper.setDisplayName('ColorWrapper');

const TextWrapper = createComponent(
  () => ({
    paddingRight: '20px',
    paddingLeft: '5px'
  }),
  'span'
);
TextWrapper.setDisplayName('TextWrapper');

const IconComponent = () => (
  <div>
    <p>Types:</p>
    <p>
      <Icon label="caret-down" type="caret-down" />
      <Icon label="caret-left" type="caret-left" />
      <Icon label="caret-right" type="caret-right" />
      <Icon label="caret-up" type="caret-up" />
      <Icon label="resize-horizontal" type="resize-horizontal" />
      <Icon label="reorder" type="reorder" />
      <Icon label="forward" type="forward" />
      <Icon label="backward" type="backward" />
      <Icon label="left" type="left" />
      <Icon label="right" type="right" />
      <Icon label="collapse" type="collapse" />
      <Icon label="edgeworker" type="edgeworker" />
      <Icon label="expand" type="expand" />
      <Icon label="retarget" type="retarget" />
      <Icon label="linkedin" type="linkedin" />
      <Icon label="twitter" type="twitter" />
      <Icon label="google-plus" type="google-plus" />
      <Icon label="facebook" type="facebook" />
      <Icon label="filter" type="filter" />
      <Icon label="calendar" type="calendar" />
      <Icon label="file" type="file" />
      <Icon label="clipboard" type="clipboard" />
      <Icon label="drive" type="drive" />
      <Icon label="speech" type="speech" />
      <Icon label="flowchart" type="flowchart" />
      <Icon label="flowchart-alt" type="flowchart-alt" />
      <Icon label="hamburger" type="hamburger" />
      <Icon label="list" type="list" />
      <Icon label="gear" type="gear" />
      <Icon label="chart" type="chart" />
      <Icon label="help" type="help" />
      <Icon label="info-sign" type="info-sign" />
      <Icon label="ok-sign" type="ok-sign" />
      <Icon label="exclamation-sign" type="exclamation-sign" />
      <Icon label="refresh" type="refresh" />
      <Icon label="time" type="time" />
      <Icon label="sad" type="sad" />
      <Icon label="happy" type="happy" />
      <Icon label="minus" type="minus" />
      <Icon label="ok" type="ok" />
      <Icon label="pause" type="pause" />
      <Icon label="plus" type="plus" />
      <Icon label="remove" type="remove" />
      <Icon label="search" type="search" />
      <Icon label="lock" type="lock" />
      <Icon label="shield" type="shield" />
      <Icon label="spectrum" type="spectrum" />
      <Icon label="upload" type="upload" />
      <Icon label="wrench" type="wrench" />
      <Icon label="bolt" type="bolt" />
      <Icon label="user" type="user" />
      <Icon label="stream" type="stream" />
    </p>

    <p>Sizes:</p>
    <p>
      <Icon label="2x" size="2x" type="gear" />
      <TextWrapper>2x</TextWrapper>
      <Icon label="2.5x" size="2.5x" type="gear" />
      <TextWrapper>2.5x</TextWrapper>
      <Icon label="3x" size="3x" type="gear" />
      <TextWrapper>3x</TextWrapper>
      <Icon label="3.5x" size="3.5x" type="gear" />
      <TextWrapper>3.5x</TextWrapper>
      <Icon label="4x" size="4x" type="gear" />
      <TextWrapper>4x</TextWrapper>
    </p>

    <p>Colors:</p>
    <p>
      <ColorWrapper>
        <Icon label="default" size="2x" type="search" color="default" />
        <TextWrapper>Default</TextWrapper>
        <Icon label="primary" size="2x" type="caret-right" color="primary" />
        <TextWrapper>Primary</TextWrapper>
        <Icon label="success" size="2x" type="ok" color="success" />
        <TextWrapper>Success</TextWrapper>
        <Icon label="warning" size="2x" type="info-sign" color="warning" />
        <TextWrapper>Warning</TextWrapper>
        <Icon label="danger" size="2x" type="exclamation-sign" color="danger" />
        <TextWrapper>Danger</TextWrapper>
        <Icon label="black" size="2x" type="remove" color="black" />
        <TextWrapper>Black</TextWrapper>
        <Icon label="white" size="2x" type="shield" color="white" />
        <TextWrapper>White</TextWrapper>
      </ColorWrapper>
    </p>
  </div>
);

export default IconComponent;
5.0.0

8 years ago

4.5.6

8 years ago

4.5.5

8 years ago

4.5.4

8 years ago

4.5.3

8 years ago

4.5.2

8 years ago

4.5.1

8 years ago

4.5.0

8 years ago

4.4.0

8 years ago

4.3.15

8 years ago

4.3.14

8 years ago

4.3.13

8 years ago

4.3.12

8 years ago

4.3.11

8 years ago

4.3.10

8 years ago

4.3.9

8 years ago

4.3.8

8 years ago

4.3.7

8 years ago

4.3.6

8 years ago

4.3.5

8 years ago

4.3.4

8 years ago

4.3.3

8 years ago

4.3.2

8 years ago

4.3.1

8 years ago

4.3.0

8 years ago

4.2.5

8 years ago

4.2.3

8 years ago

4.2.2

8 years ago

4.2.1

8 years ago

4.2.0

8 years ago

4.1.4

8 years ago

4.1.3

8 years ago

4.1.2

8 years ago

4.1.1

8 years ago

4.1.0

8 years ago

4.0.3

8 years ago

4.0.2

8 years ago

4.0.1

8 years ago

4.0.0

8 years ago

3.1.1

8 years ago

3.1.0

8 years ago

3.0.6

8 years ago

3.0.5

8 years ago

3.0.4

8 years ago

3.0.3

8 years ago

3.0.2

8 years ago

3.0.1

8 years ago

3.0.0

8 years ago

2.4.1

9 years ago

2.4.0

9 years ago

2.3.3

9 years ago

2.3.2

9 years ago

2.3.1

9 years ago

2.3.0

9 years ago

2.2.2

9 years ago

2.2.1

9 years ago

2.2.0

9 years ago

2.1.0

9 years ago

2.0.1

9 years ago

2.0.0

9 years ago

1.1.3

9 years ago

1.1.2

10 years ago

1.1.1

10 years ago

1.1.0

10 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago