Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

avalon-material-ui

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

avalon-material-ui

avalon react component with google meterial ui

  • 1.0.3
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

avalon-material-ui

安装方法

npm install avalon-material-ui

Button 按钮

  • api:将原生的href属性改成了可选,其他参数和material-ui一样

ButtonGroup 按钮组

  • api:将原生的component属性改成了可选,其他参数和material-ui一样

Checkbox 复选框

  • api:将原生的checked属性名称改为了value,所有控件统一使用value和onChange,其他参数和material-ui一样

DatePicker 日期选择器

  • api:
interface Props {
    className?: string      //根组件样式的className
    style?: CSSProperties   //根组件样式的style

    type: datepickerType    //日期类型,支持日/秒/月,'day' | 'second' | 'month'
    value: valueType        //控件值,{ start: Date; end?: Date }
    onChange: onChangeType  //值改变时触发的事件,(v: valueType) => void

    disabled?: boolean      //是否禁用,默认false
    prefix?: ReactNode      //前置文字
    isRange?: boolean       //是否为范围时间,包含开始和结束,默认false
}

Dialog 对话框

  • api:
interface Props {
    className?: string                                              //根组件样式的className
    style?: CSSProperties                                           //根组件样式的style

    onClose: ModalProps['onClose']                                  //关闭时触发的事件
    open: ModalProps['open']                                        //打开状态
    title: ReactNode                                                //顶部的标题

    content?: ReactNode                                             //中间的内容
    actions?: ReactNode                                             //底部的按钮组

    classes?: classes                                               //以下全为material-ui的Dialog参数
    disableBackdropClick?: ModalProps['disableBackdropClick']       
    disableEscapeKeyDown?: ModalProps['disableEscapeKeyDown']
    fullScreen?: DialogProps['fullScreen']
    fullWidth?: DialogProps['fullWidth']
    maxWidth?: DialogProps['maxWidth']
    onBackdropClick?: ModalProps['onBackdropClick']
    onEnter?: TransitionHandlerProps['onEnter']
    onEntered?: TransitionHandlerProps['onEntered']
    onEntering?: TransitionHandlerProps['onEntering']
    onEscapeKeyDown?: ModalProps['onEscapeKeyDown']
    onExit?: TransitionHandlerProps['onExit']
    onExited?: TransitionHandlerProps['onExited']
    onExiting?: TransitionHandlerProps['onExiting']                 //以上全为material-ui的Dialog参数

    [propName: string]: any

    onClick?(v: any): void                                          //点击时触发的事件
}

MiniDrawer 小抽屉

  • api:

interface FirstLi {                                                    //第一级目录结构
    id: string
    name: string
    icon: string
    open: boolean
    ol: Array<SecondLi>
}

interface SecondLi {                                                   //第二级目录结构
    id: string
    name: string
    component: FunctionComponent<any>
    minFrontVersion?: string
}

type Menu = Array<FirstLi>

interface Props {
    drawerOpen: boolean                                                 //打开状态
    menu: Menu                                                          //左侧菜单
    onDrawerOpenChange: (v: boolean) => void                            //打开状态改变时触发的事件
    onMenuChange: (v: Menu) => void                                     //左侧菜单改变时触发的事件
}

Select 下拉框

  • api:
interface Props {
    className?: string                                                  //根组件样式的className
    style?: CSSProperties                                               //根组件样式的style

    data: Array<                                                        //下拉框的列表数据
        | string
        | number
        | { id: string | number; name: string | number | ReactNode }
    >
    value: string | number | object | undefined                         //下拉框的值

    onChange(v: any): void                                              //下拉框的值改变时触发的事件
}

Table 表格

  • api:
interface Props {
    className?: string                                  //根组件样式的className
    style?: CSSProperties                               //根组件样式的style

    columns: Array<Column>                              //表格的列,{id: string,name: string,show: boolean}
    value: Array<object>                                //表格的值
    dence?: boolean                                     //是否为紧凑型,默认false
}

FAQs

Package last updated on 25 Jun 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc