簡體   English   中英

在 mui stepper 和覆蓋樣式中添加中間步驟

[英]add intermediate step in mui stepper and overriding style

我想更改以下代碼以滿足我的需要

  1. 我需要從這個改變設計:

在此處輸入圖像描述

對此:

在此處輸入圖像描述

我無法更改樣式並添加中間步驟

這是沙箱的林

https://codesandbox.io/s/horizo​​ntalnonlinearstepper-demo-material-ui-forked-9pqxxk

先感謝您

要使步進器圖標彼此靠近,只需更改<Stepper />組件的width 我選擇了400px ,更改此值以滿足您的需要。

sx={{
  width: "400px",
  ...
}}

我用更寬的箭頭替換了內容>並調整了top對齊方式。

".MuiStepConnector-root": {
  top: 2
},
".MuiStepConnector-root span::before": {
  display: "flex",
  justifyContent: "center",
  content: '"❯"'
}

結果如下所示:

在此處輸入圖像描述

現場演示

編輯 Horizo​​ntalNonLinearStepper 演示 - 材質 UI(分叉)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM