Skip to content

Commit

Permalink
use variable for default type
Browse files Browse the repository at this point in the history
  • Loading branch information
no-chris committed Mar 6, 2024
1 parent bb4ca32 commit cee9f85
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/chord-chart-studio/src/components/button/Button.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ import { Button as ReactAriaButton } from 'react-aria-components';

import React from 'react';

export default function Button({ children, type = 'primary', onPress }) {
const defaultType = 'primary';

export default function Button({ children, type = defaultType, onPress }) {
const className = [
styles.button,
styles[type] ? styles[type] : styles.primary,
styles[type] ? styles[type] : styles[defaultType],
];

return (
Expand Down

0 comments on commit cee9f85

Please sign in to comment.