概述

Border


目录


ColorValue (接口)

签名

interface ColorValue {
  inverted?: boolean
  level?: Level
  name?: Color
  opacity?: Opacity
}

v0.2.0 中添加

EProps (接口)

签名

interface EProps {}

v0.2.0 中添加

Props (接口)

颜色属性

定义文本、背景、边框的的颜色

颜色具体值定义在方案中。

等价于 color={value} backgroundColor={value} borderColor={value}

mkColor 同时定义本文颜色和背景颜色。其中文本颜色会自动根据当前背景颜色亮度赋值

签名

interface Props extends EProps, SProps {}

v0.2.0 中添加

SProps (接口)

签名

interface SProps {
  /**
   *背景颜色
   */
  mkBgColor?: ColorObject
  /**
   *边框颜色
   */
  mkBorderColor?: ColorObject
  /**
   *背景颜色-文本颜色根据亮度自动赋值
   */
  mkColor?: ColorObject
  /**
   *透明度
   */
  mkOpacity?: Opacity
  /**
   *文本颜色
   */
  mkTextColor?: ColorObject
}

v0.2.0 中添加

BorderColor (类型)

签名

export type BorderColor = Color

v0.2.0 中添加

Color (类型)

签名

export type Color = ColorNames | OriginColor

v0.2.0 中添加

ColorObject (类型)

签名

export type ColorObject = Color | ColorValue

v0.2.0 中添加

OriginColor (类型)

签名

export type OriginColor = 'inherit' | 'currentColor' | 'transparent'

v0.2.0 中添加

Rule (类型)

签名

export type Rule = ExtendRule<ParentRule, SProps, EProps, Theme>

v0.2.0 中添加

TextColor (类型)

签名

export type TextColor = Color

v0.2.0 中添加

ruleModule (常量)

签名


export const ruleModule: any = ...

v0.2.0 中添加

getColorValue (函数)

签名


export const getColorValue = ({ theme, source }: { theme: Theme, source?: any }) => ...

v0.2.0 中添加

getDefaultColorTextValue (函数)

签名


export const getDefaultColorTextValue = ({ value, source }: { value: ColorObject, source?: any }): {
    name: Color,
    level: Level,
    inverted: boolean,
    opacity: Opacity
} => ...

v0.2.0 中添加

getTextColor (函数)

签名


export const getTextColor = ({ source }: { source?: any }) => ...

v0.2.0 中添加

getTextColorValue (函数)

签名


export const getTextColorValue = ({ theme, source }: { theme: Theme, source?: any }) => ...

v0.2.0 中添加