@wonder-ui/styles
TypeScript icon, indicating that this package has built-in type declarations

2.0.5 • Public • Published

@wonder-ui/styles

fix react-jss ts types

Example

import { createStyles, withStyles, ClassKeysOfStyles } from '@wonder-ui/styles';

const styles = createStyles({
  root: {
    color: 'red'
  }
});

export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
  classes: ClassKeysOfStyles<typeof styles>;
}

const Button = React.forwardRef(function Button(props: ButtonProps){
  const { classes, className, ...rest } = props;
  return <button className={classes.root + ' ' + className} {...rest}/>
})

export default withStyles(styles)(Button);

/@wonder-ui/styles/

    Package Sidebar

    Install

    npm i @wonder-ui/styles

    Weekly Downloads

    9

    Version

    2.0.5

    License

    MIT

    Unpacked Size

    806 kB

    Total Files

    47

    Last publish

    Collaborators

    • jian263994241
    • caijf