Skip to content

Commit

Permalink
Added default value for the enum for the validator
Browse files Browse the repository at this point in the history
Merged the style and the sx
  • Loading branch information
Alex-NRCan committed Oct 17, 2023
1 parent e229df1 commit f1d7baa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/chart-validator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ export class ChartValidator {
type: 'object',
properties: {
chart: {
type: 'string',
enum: ['line', 'bar', 'pie', 'doughnut'],
default: 'line',
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion src/chart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ export function Chart(props: TypeChartChartProps<GeoChartType>): JSX.Element {
}}
defaultChecked
/>
<Typography style={{ color: color as string }} sx={sxClasses.checkDataset} noWrap>
<Typography sx={{ ...sxClasses.checkDataset, ...{ color } }} noWrap>
{ds.label}
</Typography>
</Box>
Expand Down

0 comments on commit f1d7baa

Please sign in to comment.