[go: nahoru, domu]

Skip to content

Commit

Permalink
Merge pull request #3 from stefang/master
Browse files Browse the repository at this point in the history
Fixed missing props prefix
  • Loading branch information
twisty committed Nov 17, 2019
2 parents 38a0597 + 7bd5566 commit 2ba48f3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ export class RadialProgress extends React.Component<Props, State> {
position: 'absolute',
textAlign: 'center',
color: this.props.ringFgColour,
fontSize: `${diameter / fontRatio}px`,
fontSize: `${diameter / this.props.fontRatio}px`,
};
return (
<div className="RadialProgressIndicator__label" style={style}>
Expand Down
11 changes: 11 additions & 0 deletions stories/radial-progress.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,17 @@ stories
text={(steps, proportion) => `${Math.floor(proportion * 100)}%`}
/>
))
.add('Custom font ratio', () => (
<RadialProgress
steps={5}
step={5}
width={200}
height={200}
fontRatio={8}
showIntermediateProgress={true}
text={(steps, proportion) => `${Math.floor(proportion * 100)}%`}
/>
))
.add('Small, with custom text', () => (
<div style={{ fontWeight: 'bold' }}>
<RadialProgress
Expand Down

0 comments on commit 2ba48f3

Please sign in to comment.