63 Commits

Author SHA1 Message Date
Kevin Qi
af3955cb12 extract types into types.ts file 2019-05-04 13:04:10 -07:00
Kevin Qi
cdb2f8a3a0 add { buildStyles } exported function, which helps build a styles object 2019-05-04 12:56:39 -07:00
Kevin Qi
51ed7bff83 fix css comment 2019-05-03 09:54:39 -07:00
Kevin Qi
f65a8e56db extract Path.tsx, rename the constants 2019-05-02 23:15:57 -07:00
Kevin Qi
0314a8453f add explanatory comments, tweak-refactor dashoffset calculation 2019-05-02 22:04:59 -07:00
Kevin Qi
760d566e31 add circleRatio prop, make it work 2019-04-28 15:32:28 -07:00
Kevin Qi
7cd9e97c16 WIP extracting Path component for both path+trail 2019-04-28 15:32:28 -07:00
Kevin Qi
8d852a7137 make trail use round linecap, which comes into play when trail doesn't cover full diameter 2019-04-28 15:32:28 -07:00
jeremy
0f8ce7e3b2 add dashboard style with gap 2019-04-25 23:49:47 -07:00
Kevin Qi
60b1cae1cf move component to a separate CircularProgressbar.tsx file 2019-04-21 19:46:43 -07:00
Kevin Qi
26e41a2970 remove prop-types dependency 2019-04-21 18:51:30 -07:00
Kevin Qi
f8e2f2c498 make defaultProps typing more accurate - styles can have missing keys, but classes cannot 2019-04-21 18:31:36 -07:00
Kevin Qi
a036d60a0e move tests to a new /test dir so it doesn't get included in /dist 2019-04-21 17:36:44 -07:00
Kevin Qi
99d5001fe4 port demo from /docs to /demo, with some slight modifications (remove codesandbox iframe, etc) 2019-04-21 14:01:01 -07:00
Kevin Qi
42ef9e9f29 finish porting tests, change default values on props.text and props.className to be '' 2019-04-21 12:18:15 -07:00
Kevin Qi
c4f0119df2 add enzyme test setup 2019-04-21 11:20:32 -07:00
Kevin Qi
c0efc187a1 add jest setup, WIP porting tests 2019-04-20 22:46:48 -07:00
Kevin Qi
8bb14fe3e5 fix typescript compilation errors, change backgroundPadding default to 0 2019-04-20 20:31:19 -07:00
Kevin Qi
e2fa517fdf add react types and define proptypes in TS 2019-04-20 20:04:55 -07:00
Kevin Qi
d33a8db742 change build process to use tsc instead of webpack, gitignore /dist, and WIP converting index.jsx -> index.tsx 2019-04-20 20:04:22 -07:00
Kevin Qi
8f549913b7 WIP removing classForPercentage/textForPercentage 2018-06-24 13:19:43 -07:00
Kevin Qi
bf2b4504f3 add text prop 2018-06-24 12:48:21 -07:00
Kevin Qi
8d485249b4 make styles.root used 2018-06-23 22:10:28 -07:00
Kevin Qi
bbc8bba178 add styles prop to README and demo 2018-01-29 23:04:39 -08:00
antoniogiordano
d55cc6408a Added styles prop to add inline styles to Progress objects 2018-01-21 16:52:21 +01:00
Kevin Qi
4db3282747 add comments for getPathDescription 2017-12-17 15:52:00 -08:00
Kevin Qi
d933206078 remove magic numbers and use constants 2017-12-17 15:49:57 -08:00
Kevin Qi
8b444c770e WIP, add counterclockwise prop 2017-12-17 15:13:53 -08:00
Kevin Qi
0e2a84f4eb more specific proptype declaration 2017-10-14 00:32:00 -07:00
Kevin Qi
f968ec68c6 add classes.background 2017-10-14 00:15:11 -07:00
Andy Edwards
3f8da116cb fix(index): support classes prop 2017-10-14 00:10:47 -07:00
Kevin Qi
60f5ba371c tweak JSX formatting 2017-10-13 23:33:41 -07:00
Andy Edwards
cc63394466 fix eslint errors 2017-10-13 23:21:51 -07:00
Andy Edwards
7cc5891bdb fix eslint errors 2017-10-13 23:21:51 -07:00
Andy Edwards
1d7d84cc7b don't render <text> if textForPercentage is falsy or returns falsy
fix #24
2017-10-13 23:21:51 -07:00
Kevin Qi
df50365929 set a better default for background 2017-10-13 23:16:29 -07:00
Kevin Qi
eb2877c19e add background prop defaulting to false, fixing issue wehre existing users upgrading to 0.3.0 would see a black circle shape if they don't update CSS 2017-10-13 22:56:45 -07:00
Kevin Qi
f717fefae9 rename backgroundPadding, add docs, and reformat demo page 2017-10-13 22:09:40 -07:00
Kevin Qi
d24cbe5a81 fix logic causing path length to be drawn incorrectly, and add backgroundGutter prop to enable customization 2017-10-13 21:49:38 -07:00
Andrey Saleba
241a311ab7 Fixed formatting issues 2017-09-10 15:32:11 +03:00
Andrey Saleba
770600576f Added <circle> element inside progressbar to support custom background color 2017-09-10 15:30:18 +03:00
Kevin Qi
5937869f14 refactor, move stuff into methods 2017-08-27 18:07:10 -07:00
Kevin Qi
0cd91b0660 set default value of className prop to '', fixes 'undefined' default 2017-08-27 17:51:08 -07:00
Kevin Qi
8baa206378 Merge pull request #20 from slaweet/patch-1
Keep progress bar within 0 and 100
2017-08-27 17:47:29 -07:00
Kevin Qi
0101950960 add className prop 2017-08-27 17:05:31 -07:00
Vít Stanislav
f985313173 Keep progress bar within 0 and 100
## Expected behaviour
`<CircularProgressbar percentage={150} />` should show full progress bar. And the text should keep being `150%`
## Actual behaviour
`<CircularProgressbar percentage={150} />` shows half full progress bar
2017-07-18 17:08:07 +02:00
Kevin Qi
fd6741a637 update to use prop-types package instead of importing PropTypes from react
fixes #12
2017-05-07 20:42:44 -07:00
Kevin Qi
2d19153338 Specify svg width to be 100% in default stylesheet, to fix flexbox issue (#5) 2017-02-04 20:04:27 -08:00
Kevin Qi
5c74157d81 Fix issue where window.requestAnimationFrame callback can still be invoked after component is unmounted, causing an error 2016-11-08 11:24:33 -05:00
Wiktor Ożga
a81774984d Fixes #1 2016-09-15 09:01:28 +02:00