Skip to content

Commit

Permalink
feat(react): 新增 CommonComponentProps
Browse files Browse the repository at this point in the history
  • Loading branch information
fjc0k committed Jul 25, 2020
1 parent 2dd4a9b commit edcd28d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/react/CommonComponentProps.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from 'react'

/**
* 常用的组件属性。
*/
export interface CommonComponentProps<TRef = never> {
key?: React.Key
ref?: React.Ref<TRef>
className?: string
style?: React.CSSProperties
}
1 change: 1 addition & 0 deletions src/react/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
export * from 'react-use'

// @index(['./**/*.ts', '!./**/*.{test,taro}.*', '!./{useToggle,createGlobalState,useTitle,useInterval,useSearchParam,useLocalStorage,useWindowSize,useHover}.*'], f => `export * from '${f.path}'`)
export * from './CommonComponentProps'
export * from './defineComponent'
export * from './ExtendComponentProps'
export * from './isVisibleValue'
Expand Down

0 comments on commit edcd28d

Please sign in to comment.