0.0.4 • Published 5 years ago

@newamerica/meta v0.0.4

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

@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

proptypedefaultrequireddescription
children*:x:
classNameString:x:
fullBooleanfalse:x:Wraps your children in a div with the class dv-ChartContainer__child
noBackgroundBooleanfalse:x:Removes the light gray background and padding from the chart container
styleObject:x:

Description

From ./src/Description/index.js

proptypedefaultrequireddescription
children*:x:
classNameString:x:
styleObject:x:

Source

From ./src/Source/index.js

proptypedefaultrequireddescription
children*:x:
classNameString:x:
styleObject:x:

Title

From ./src/Title/index.js

proptypedefaultrequireddescription
children*:x:
classNameString:x:
styleObject:x: