feat: 新增輸入表單的核心元件#124
Merged
wendyyuchensun merged 6 commits intocoseeing:mainfrom Apr 21, 2026
Merged
Conversation
f9fb917 to
cc84d56
Compare
jamliaoo
reviewed
Apr 21, 2026
Comment on lines
+32
to
+33
| const isDisplayEmpty = !display.trim(); | ||
| const isUrlEmpty = !url.trim(); |
| {...props} | ||
| /> | ||
| {error && ( | ||
| <span id={`${id}-error`} role="alert" className="text-sm text-error leading-[1.4]"> |
Collaborator
There was a problem hiding this comment.
這裡依賴 id prop 來提供 error message,那 id 是不是要改為必填或是加個 fallback 呢?
| id={id} | ||
| type={type} | ||
| value={value} | ||
| onChange={onChange} |
Collaborator
There was a problem hiding this comment.
nit
onChange 的參數 radio 那邊是傳 value,這裡是用 event,如果沒有特殊需求的話感覺兩邊統一比較一至~
jamliaoo
approved these changes
Apr 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
摘要
新增輸入表單的核心元件,供日後 exports/iframe/image input modal 可以共用:
TextInput核心元件,統一輸入框樣式,支援 label、hint、錯誤訊息及 disabled 狀態RadioGroup核心元件,支援:options陣列管理選項,每個選項可獨立設定disabled其他
LinkInputModal,以TextInput與RadioGroup取代原有的 inline 表單元素