0
작은 데스크탑 응용 프로그램 용 시약으로 clojurescript (reagent-material-ui)에 포장 된 material-ui 프레임 워크를 사용하고 있습니다. reagent/as-element
함수를 사용하여 반응 요소를 구성 할 때 소품과 스타일을 전달할 수 있는지 궁금합니다. , 어떻게?Clojurescript 시약/엘리먼트 통과 소품?
작은 데스크탑 응용 프로그램 용 시약으로 clojurescript (reagent-material-ui)에 포장 된 material-ui 프레임 워크를 사용하고 있습니다. reagent/as-element
함수를 사용하여 반응 요소를 구성 할 때 소품과 스타일을 전달할 수 있는지 궁금합니다. , 어떻게?Clojurescript 시약/엘리먼트 통과 소품?
ragent-material-ui
은 cljsjs/material-ui "0.19.0-0"
을 사용하고 있습니다. 해당 material-ui 스타일 문서는 here입니다.
문서를 기반으로 한 장면이 있습니다.
;; Using inline styles
(ns my.project
(:require [reagent-material-ui.core :as ui]
[reagent.core :as reagent]))
(reagent/as-element [ui/IconMenu
{:iconButtonElement
(el [ui/IconButton {:touch true} [icon "more_vert"]])
:style {}} ;; Your inline styles here
[ui/MenuItem "Delete"]])
;; Using component specific overrides
;; (depending on the type of element you are styling this will differ)
(reagent/as-element [ui/IconMenu
{:iconButtonElement
(el [ui/IconButton {:touch true} [icon "more_vert"]])
:listStyle {}} ;; Your root element overrides here
[ui/MenuItem "Delete"]])
답장을 보내 주셔서 감사합니다. 덕분에 문서를 다시 방문하여 해결책을 찾게되었습니다. 다시 한번 감사드립니다! – narocath
'r/as-element' 내부에서 소품에 접근하는 방법을 찾았습니까? –