UNPKG

taro-hooks

Version:
9 lines (8 loc) 506 B
import type { ExcludeOption, PromiseOptionalAction, PromiseAction } from '../type'; export type ColorOption = ExcludeOption<Taro.setBackgroundColor.Option>; export type SetColor = PromiseOptionalAction<ColorOption>; export type StyleOption = ExcludeOption<Taro.setBackgroundTextStyle.Option>; export type SetStyle = PromiseAction<StyleOption['textStyle']>; export type Option = ColorOption & StyleOption; declare function useBackground(option?: Option): [SetColor, SetStyle]; export default useBackground;