diff --git a/src/ChipInput.js b/src/ChipInput.js index 9974526..78bef72 100644 --- a/src/ChipInput.js +++ b/src/ChipInput.js @@ -685,7 +685,7 @@ ChipInput.defaultProps = { variant: 'standard' } -export default withStyles(styles)(ChipInput) +export default withStyles(styles, { name: 'WAMuiChipInput' })(ChipInput) export const defaultChipRenderer = ({ value, text, isFocused, isDisabled, handleClick, handleDelete, className }, key) => ( { expect(handleUpdateInput).toHaveBeenCalled() }) }) + +it('should have a className prefix', () => { + expect(ChipInput.options.name).toBe('WAMuiChipInput') +}) diff --git a/src/__snapshots__/ChipInput.spec.js.snap b/src/__snapshots__/ChipInput.spec.js.snap index 7b41c86..9f1d314 100644 --- a/src/__snapshots__/ChipInput.spec.js.snap +++ b/src/__snapshots__/ChipInput.spec.js.snap @@ -14,23 +14,23 @@ exports[`uncontrolled mode matches the snapshot 1`] = ` blurBehavior="clear" classes={ Object { - "chip": "ChipInput-chip-17", - "chipContainer": "ChipInput-chipContainer-4", - "disabled": "ChipInput-disabled-14", - "error": "ChipInput-error-16", - "filled": "ChipInput-filled-7", - "focused": "ChipInput-focused-13", - "helperText": "ChipInput-helperText-11", - "inkbar": "ChipInput-inkbar-12", - "input": "ChipInput-input-3", - "inputRoot": "ChipInput-inputRoot-2", - "label": "ChipInput-label-9", - "labelShrink": "ChipInput-labelShrink-10", - "labeled": "ChipInput-labeled-8", - "outlined": "ChipInput-outlined-5", - "root": "ChipInput-root-1", - "standard": "ChipInput-standard-6", - "underline": "ChipInput-underline-15", + "chip": "WAMuiChipInput-chip-17", + "chipContainer": "WAMuiChipInput-chipContainer-4", + "disabled": "WAMuiChipInput-disabled-14", + "error": "WAMuiChipInput-error-16", + "filled": "WAMuiChipInput-filled-7", + "focused": "WAMuiChipInput-focused-13", + "helperText": "WAMuiChipInput-helperText-11", + "inkbar": "WAMuiChipInput-inkbar-12", + "input": "WAMuiChipInput-input-3", + "inputRoot": "WAMuiChipInput-inputRoot-2", + "label": "WAMuiChipInput-label-9", + "labelShrink": "WAMuiChipInput-labelShrink-10", + "labeled": "WAMuiChipInput-labeled-8", + "outlined": "WAMuiChipInput-outlined-5", + "root": "WAMuiChipInput-root-1", + "standard": "WAMuiChipInput-standard-6", + "underline": "WAMuiChipInput-underline-15", } } clearInputValueOnChange={false} @@ -50,12 +50,12 @@ exports[`uncontrolled mode matches the snapshot 1`] = ` variant="standard" >