Skip to content

Commit

Permalink
fix: data.elgnth update
Browse files Browse the repository at this point in the history
  • Loading branch information
afeiship committed Nov 16, 2024
1 parent 3840bcf commit 51b0391
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
11 changes: 6 additions & 5 deletions public/src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ import styled from 'styled-components';
import data from './data.json';

const Container = styled.div`
width: 80%;
margin: 30px auto 0;
.react-calendar-graph {
width: 90%;
}
width: 80%;
margin: 30px auto 0;
.react-calendar-graph {
width: 90%;
}
`;

export default () => {
Expand Down
6 changes: 4 additions & 2 deletions src/components/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ export default class ReactCalendarGraph extends Component<ReactCalendarGraphProp
data: [],
options: {
showWeekdayLabels: true,
hideTotalCount:true,
hideColorLegend:true,
hideTotalCount: true,
hideColorLegend: true
}
};

Expand All @@ -60,6 +60,8 @@ export default class ReactCalendarGraph extends Component<ReactCalendarGraphProp

render() {
const { className, data, options, ...props } = this.props;
if (!data?.length) return null;

return (
<section data-component={CLASS_NAME} className={classNames(CLASS_NAME, className)} {...props}>
<ActivityCalendar
Expand Down

0 comments on commit 51b0391

Please sign in to comment.