@newamerica/meta

0.0.4 • Public • Published

@newamerica/meta

Components for wrapping charts with New America-styled backgrounds, titles, descriptions, and sources.

Installation

npm install @newamerica/meta --save

Usage Example

import { ChartContainer, Title, Description, Source } from "@newamerica/meta";
import "@newamerica/meta/dist/styles.css";

const MyChart = () => (
  <ChartContainer>
    <Title>This is a title</Title>
    <Description>This is a description</Description>
    // your chart here
    <Source>This is a source</Source>
  </ChartContainer>
);

Components

API

ChartContainer

From ./src/ChartContainer/index.js

prop type default required description
children *
className String
full Boolean false Wraps your children in a div with the class dv-ChartContainer__child
noBackground Boolean false Removes the light gray background and padding from the chart container
style Object

Description

From ./src/Description/index.js

prop type default required description
children *
className String
style Object

Source

From ./src/Source/index.js

prop type default required description
children *
className String
style Object

Title

From ./src/Title/index.js

prop type default required description
children *
className String
style Object

Readme

Keywords

none

Package Sidebar

Install

npm i @newamerica/meta

Weekly Downloads

2

Version

0.0.4

License

MIT

Unpacked Size

13.2 kB

Total Files

18

Last publish

Collaborators

  • lries