You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

cf-component-card

Package Overview
Dependencies
Maintainers
23
Versions
88
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cf-component-card

Cloudflare Card Component

5.0.0
latest
npmnpm
Version published
Weekly downloads
133
-10.14%
Maintainers
23
Weekly downloads
 
Created
Source

cf-component-card

Cloudflare Card Component

Installation

Installation with yarn is recommended


$ yarn add cf-component-card

Usage

import React from 'react';
import {
  Card,
  CardBlock,
  CardContent,
  CardControl,
  CardDrawers,
  CardMessages,
  CardSection,
  CardTitle,
  CardFooter,
  CardToolbar,
  CardToolbarLink
} from 'cf-component-card';
import { Button } from 'cf-component-button';

class CardComponent extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
      activeDrawer: null
    };
  }

  render() {
    return (
      <Card>
        <CardSection>
          <CardContent>
            <CardTitle>Hello World</CardTitle>
            <p>Here is some content.</p>
            <CardMessages
              messages={[
                { type: 'info', content: 'Info Message' },
                { type: 'error', content: 'Error Message' }
              ]}
            />
            <CardFooter>This is a footer message</CardFooter>
          </CardContent>
          <CardControl>
            <CardBlock>This is a block</CardBlock>
            <CardBlock>
              <Button type="default" onClick={() => {}}>
                Example Control
              </Button>
            </CardBlock>
          </CardControl>
        </CardSection>
        <CardDrawers
          drawers={[
            {
              id: 'one',
              name: 'One',
              content: <p>One</p>
            },
            {
              id: 'two',
              name: 'Two',
              content: <p>Two</p>
            }
          ]}
        />
        <CardToolbar
          controls={[]}
          links={[
            <CardToolbarLink
              key="ToolBarLink"
              expandable={false}
              isActive={false}
              onClick={() =>
                window.open('https://en.wikipedia.org/wiki/Main_Page')
              }
            >
              Wikipedia
            </CardToolbarLink>
          ]}
        />
      </Card>
    );
  }
}

export default CardComponent;

FAQs

Package last updated on 08 May 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.