From 9debe7e82645e85498e2aad2ee621e628f771de7 Mon Sep 17 00:00:00 2001 From: Kevin Qi Date: Mon, 30 May 2016 18:02:26 -0400 Subject: [PATCH] Add travis-ci badge, tweak demos --- README.md | 2 ++ demo/demo.jsx | 29 +++++++++++++++++------------ 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index eda2195..a6e3c22 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ A circular progress indicator component, built with SVG. Easily customizable with CSS. +[![Build Status](https://travis-ci.org/iqnivek/react-circular-progressbar.svg?branch=master)](https://travis-ci.org/iqnivek/react-circular-progressbar) + ## Installation Install the npm module: diff --git a/demo/demo.jsx b/demo/demo.jsx index f97e6bd..19ca10e 100644 --- a/demo/demo.jsx +++ b/demo/demo.jsx @@ -6,28 +6,28 @@ console.log(`react-circular-progressbar v${COMPONENT_VERSION}`); const githubURL = 'https://github.com/iqnivek/react-circular-progressbar'; -const DemoItem = (props) => ( +const Config = ({ name, example, description, children }) => (
-

{props.name}{props.example ? `e.g. ${props.example}` : null}

-

{props.description}

+

{name}{example ? `e.g. ${example}` : null}

+

{description}

- {props.children} + {children}
); -const Example = (props) => ( +const Example = ({ description, children }) => (
- {props.children} + {children}
-

{props.description}

+

{description}

); @@ -110,15 +110,15 @@ class Demo extends React.Component { percentages={[0, 25, 50, 75, 100]} textForPercentage={(percentage) => { if (percentage === 0) { - return 'zilch..'; + return `$${percentage}`; } else if (percentage < 50) { - return 'hmm..'; + return `${percentage}!`; } else if (percentage < 75) { - return 'okay..'; + return `${percentage}`; } else if (percentage < 100) { - return 'yeah!'; + return `*${percentage}*`; } else { - return 'WOO!'; + return `${percentage}/100`; } }} /> @@ -128,6 +128,11 @@ class Demo extends React.Component {

Configuration

+ +
View project on Github