File tree Expand file tree Collapse file tree 5 files changed +23
-17
lines changed
Expand file tree Collapse file tree 5 files changed +23
-17
lines changed Original file line number Diff line number Diff line change @@ -115,6 +115,13 @@ mycdark:
115115 @apply border-primary!;
116116}
117117
118+ .rounded-box-modal {
119+ @apply rounded-box;
120+ @variant max-md {
121+ --radius-box : 0px !important ;
122+ }
123+ }
124+
118125/* CDNからダウンロードするURLを指定したらなんかエラー出るので、npmでインストールしてlayout.tsxでimportすることにした */
119126@theme {
120127 /*
Original file line number Diff line number Diff line change @@ -133,10 +133,9 @@ export function EditorComponent(props: EditorProps) {
133133 return (
134134 < Modal
135135 className = { clsx (
136- "border border-accent border-2 rounded-box overflow-hidden" ,
136+ "overflow-hidden" ,
137137 "flex flex-col"
138138 ) }
139- classNameNonModal = "shadow-md m-2"
140139 open = { isModal }
141140 onClose = { ( ) => setIsModal ( false ) }
142141 >
@@ -151,7 +150,7 @@ export function EditorComponent(props: EditorProps) {
151150 </ span >
152151 < button
153152 className = { clsx (
154- "btn btn-xs btn-soft btn-warning mt-1 mb -1" ,
153+ "btn btn-sm btn-soft btn-warning my -1" ,
155154 // codeの内容が変更された場合のみ表示する
156155 ( props . readonly || code == props . initContent ) && "invisible"
157156 ) }
@@ -176,7 +175,7 @@ export function EditorComponent(props: EditorProps) {
176175 />
177176 </ g >
178177 </ svg >
179- 元の内容に戻す
178+ < span className = "hidden md:inline" > 元の内容に戻す</ span >
180179 </ button >
181180 < div className = "flex-1" />
182181 < MinMaxButton open = { isModal } setOpen = { setIsModal } />
Original file line number Diff line number Diff line change @@ -119,16 +119,11 @@ export function ExecFile(props: ExecProps) {
119119
120120 return (
121121 < Modal
122- className = { clsx (
123- "border border-accent border-2 rounded-box relative" ,
124- "flex flex-col" ,
125- "isolate"
126- ) }
127- classNameNonModal = "shadow-md m-2"
122+ className = { clsx ( "relative" , "flex flex-col" , "isolate" ) }
128123 open = { isModal }
129124 onClose = { ( ) => setIsModal ( false ) }
130125 >
131- < div className = "bg-base-200 flex w-full items-center rounded-t-box" >
126+ < div className = "bg-base-200 flex w-full overflow-x-clip overflow-y-visible items-center rounded-t-box" >
132127 < button
133128 /* daisyuiのbtnはheightがvar(--size)で固定。
134129 ここでは最小でそのサイズ、ただし親コンテナがそれより大きい場合に大きくしたい
Original file line number Diff line number Diff line change @@ -65,13 +65,19 @@ export function Modal(props: Props) {
6565 ? clsx (
6666 "modal-box" ,
6767 "max-w-300 p-0" ,
68- "size-[calc(100%-1rem)]" ,
68+ "size-full" ,
69+ "md:border-2 border-accent" ,
70+ "rounded-box-modal" , // globals.cssで定義。md未満の場合、--radius-boxを上書きしこれ以下の要素のrounded-boxを無効にする
6971 "md:size-[calc(100%-2rem)]" ,
7072 "lg:size-[calc(100%-4rem)]" ,
7173 "xl:size-[calc(100%-6rem)]" ,
7274 props . classNameModal
7375 )
74- : clsx ( props . classNameNonModal ) ,
76+ : clsx (
77+ "border-2 border-accent rounded-box" ,
78+ "shadow-md m-2 h-max" ,
79+ props . classNameNonModal
80+ ) ,
7581 props . className
7682 ) }
7783 >
@@ -91,7 +97,7 @@ export function MinMaxButton(props: {
9197} ) {
9298 return (
9399 < button
94- className = { clsx ( "btn btn-xs btn-soft btn-accent mt -1 mb-1 mr-2 " ) }
100+ className = { clsx ( "btn btn-sm btn-soft btn-accent my -1 mr-1 " ) }
95101 onClick = { ( ) => props . setOpen ( ! props . open ) }
96102 >
97103 { props . open ? (
Original file line number Diff line number Diff line change @@ -458,15 +458,14 @@ export function ReplTerminal({
458458 return (
459459 < Modal
460460 className = { clsx (
461- "bg-base-300 border border-accent border-2 rounded-box " ,
461+ "bg-base-300" ,
462462 "flex flex-col" ,
463463 "isolate"
464464 ) }
465- classNameNonModal = "shadow-md m-2 h-max"
466465 open = { isModal }
467466 onClose = { ( ) => setIsModal ( false ) }
468467 >
469- < div className = "bg-base-200 w-full flex items-center rounded-t-box" >
468+ < div className = "bg-base-200 w-full overflow-x-clip overflow-y-visible flex items-center rounded-t-box" >
470469 < button
471470 /* daisyuiのbtnはheightがvar(--size)で固定。
472471 ここでは最小でそのサイズ、ただし親コンテナがそれより大きい場合に大きくしたい
You can’t perform that action at this time.
0 commit comments