widget/react/prop

Types

CSS 스타일 객체

pub type Style

Values

pub fn any(
  props: react.Props,
  key: String,
  value: a,
) -> react.Props

임의 타입 속성

pub fn bool(
  props: react.Props,
  key: String,
  value: Bool,
) -> react.Props

불리언 속성

pub fn class(
  props: react.Props,
  class_name: String,
) -> react.Props

className 설정

pub fn classes(
  props: react.Props,
  class_names: List(String),
) -> react.Props

여러 클래스명을 공백으로 결합

pub fn float(
  props: react.Props,
  key: String,
  value: Float,
) -> react.Props

실수 속성

pub fn int(
  props: react.Props,
  key: String,
  value: Int,
) -> react.Props

정수 속성

pub fn key(props: react.Props, key: String) -> react.Props

key 설정

pub fn new() -> react.Props

빈 props 객체 생성

pub fn new_style() -> Style

빈 스타일 객체 생성

pub fn on(
  props: react.Props,
  event_name: String,
  handler: fn(e) -> Nil,
) -> react.Props

범용 이벤트 핸들러

pub fn on_blur(
  props: react.Props,
  handler: fn(e) -> Nil,
) -> react.Props

onBlur

pub fn on_change(
  props: react.Props,
  handler: fn(e) -> Nil,
) -> react.Props

onChange

pub fn on_click(
  props: react.Props,
  handler: fn(e) -> Nil,
) -> react.Props

onClick

pub fn on_focus(
  props: react.Props,
  handler: fn(e) -> Nil,
) -> react.Props

onFocus

pub fn on_key_down(
  props: react.Props,
  handler: fn(e) -> Nil,
) -> react.Props

onKeyDown

pub fn on_submit(
  props: react.Props,
  handler: fn(e) -> Nil,
) -> react.Props

onSubmit

pub fn ref(props: react.Props, ref: react.Ref(a)) -> react.Props

ref 설정

pub fn set(style: Style, key: String, value: String) -> Style

스타일 속성 설정

pub fn string(
  props: react.Props,
  key: String,
  value: String,
) -> react.Props

문자열 속성

pub fn style(props: react.Props, style: Style) -> react.Props

style 객체 설정

Search Document