Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export const CardAction = (props: CardActionPropsT) => {
/* istanbul ignore next */
deprecationWarning(
'The CardAction component has been removed in favor of CardActionIcon and CardActionButton due to impossible type intersections of IconButtonProps and ButtonProps'
);
return props.icon ? (
// @ts-ignore
) : (
);
};
render() {
const { progress, buffer, determinate, ...rest } = this.props;
if (determinate !== undefined) {
deprecationWarning(
'LinearProgress determinate is no longer a valid prop. Determinate is set automatically be the presence of the progress prop.'
);
}
return (
);
children,
textarea,
inputRef,
characterCount,
icon: _icon,
trailingIcon: _trailingIcon,
withLeadingIcon: _withLeadingIcon,
withTrailingIcon: _withTrailingIcon,
rootProps = {},
...rest
} = this.props;
let { icon, trailingIcon, withLeadingIcon, withTrailingIcon } = this.props;
if (dense !== undefined) {
deprecationWarning(
`Textfield prop 'dense' is being removed in a future release by material-components-web.`
);
}
if (withLeadingIcon !== undefined) {
deprecationWarning(`Textfield prop 'withLeadingIcon' is now 'icon'.`);
icon = withLeadingIcon;
}
if (withTrailingIcon !== undefined) {
deprecationWarning(
`Textfield prop 'withTrailingIcon' is now 'trailingIcon'.`
);
trailingIcon = withTrailingIcon;
}
onTrailingIconInteraction,
onRemove,
onSelect,
icon,
trailingIcon,
checkmark,
text,
label,
children,
...rest
} = this.props;
let labelToUse = label;
if (text) {
deprecationWarning('Chip `text` is now `label`');
labelToUse = text;
}
return (
{!!icon && (
)}
{!!checkmark && (
icon: _icon,
withLeadingIcon: _withLeadingIcon,
onChange,
onFocus,
onBlur,
onKeyDown,
invalid,
inputRef,
helpText,
...rest
} = this.props;
let { icon, withLeadingIcon } = this.props;
if (withLeadingIcon !== undefined) {
deprecationWarning(`Select prop 'withLeadingIcon' is now 'icon'.`);
icon = withLeadingIcon;
}
const selectOptions = createSelectOptions(options);
const defaultValue =
value !== undefined ? undefined : this.props.defaultValue || '';
const sharedEventProps = {
onChange: this.handleChange,
onFocus: this.handleFocus,
onBlur: this.handleBlur,
onTouchStart: this.handleClick,
onMouseDown: this.handleClick
};
render() {
const { icon, iconOptions, onIcon, onIconOptions, ...rest } = this.props;
if (iconOptions || onIconOptions) {
deprecationWarning(
'IconButton component props iconOptions and onIconOptions must be passed directly to the icon and onIcon prop. This issue has NOT been automatically fixed for you, please update your code.'
);
}
return (
);