feat: add sound settings support to AbacusReact component
- Add soundEnabled and soundVolume props to AbacusConfig interface - Allow direct prop overrides for sound settings in component - Maintain backward compatibility with context-based configuration 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
3fa314aaa5
commit
90b9ffa0d8
|
|
@ -234,6 +234,8 @@ export interface AbacusConfig {
|
|||
interactive?: boolean;
|
||||
gestures?: boolean;
|
||||
showNumbers?: boolean;
|
||||
soundEnabled?: boolean;
|
||||
soundVolume?: number;
|
||||
|
||||
// Advanced customization
|
||||
customStyles?: AbacusCustomStyles;
|
||||
|
|
@ -1302,6 +1304,8 @@ export const AbacusReact: React.FC<AbacusConfig> = ({
|
|||
interactive,
|
||||
gestures,
|
||||
showNumbers,
|
||||
soundEnabled,
|
||||
soundVolume,
|
||||
// Advanced customization props
|
||||
customStyles,
|
||||
callbacks,
|
||||
|
|
@ -1337,8 +1341,8 @@ export const AbacusReact: React.FC<AbacusConfig> = ({
|
|||
interactive: interactive ?? contextConfig.interactive,
|
||||
gestures: gestures ?? contextConfig.gestures,
|
||||
showNumbers: showNumbers ?? contextConfig.showNumbers,
|
||||
soundEnabled: contextConfig.soundEnabled,
|
||||
soundVolume: contextConfig.soundVolume
|
||||
soundEnabled: soundEnabled ?? contextConfig.soundEnabled,
|
||||
soundVolume: soundVolume ?? contextConfig.soundVolume
|
||||
};
|
||||
// Calculate effective columns first, without depending on columnStates
|
||||
const effectiveColumns = useMemo(() => {
|
||||
|
|
|
|||
1642
pnpm-lock.yaml
1642
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue