File tree Expand file tree Collapse file tree
apps/docs/src/components/stages Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -113,7 +113,14 @@ export default function Stage(props: Props): JSX.Element {
113113
114114 < Show when = { props . source } >
115115 { s => (
116- < Code . Root wrap ln = { 0 } lang = "tsx" class = { styles . code } style = { { height : codeHeight ( ) } } >
116+ < Code . Root
117+ wrap
118+ ln = { 0 }
119+ lang = "tsx"
120+ class = { styles . code }
121+ style = { { height : codeHeight ( ) } }
122+ decorates = { [ 'toolbar' ] }
123+ >
117124 { s ( ) }
118125 </ Code . Root >
119126 ) }
Original file line number Diff line number Diff line change 106106 }
107107
108108 .code {
109- @apply border-transparent rounded-none ! flex-1 w-1/2;
109+ @apply bg-palette-2-bg ! flex-1 w-1/2;
110110 }
111+ }
111112
112- .stage .vertical {
113- @apply flex-col items-stretch! justify-stretch!;
113+ .stage .vertical {
114+ @apply flex-col items-stretch! justify-stretch!;
114115
115- .demo {
116- @apply w-full max-w-full;
117- }
116+ .demo {
117+ @apply w-full max-w-full;
118+ }
118119
119- .code {
120- @apply w-full;
121- }
120+ .code {
121+ @apply w-full;
122122 }
123+ }
123124
124- .stage .auto {
125- @apply @max- 3 xl/stages:flex-col! @max- 3 xl/stages:justify-start! @max- 3 xl/stages:items-start!;
125+ .stage .auto {
126+ @apply @max- 3 xl/stages:flex-col! @max- 3 xl/stages:justify-start! @max- 3 xl/stages:items-start!;
126127
127- .demo {
128- @apply h-full min-h-fit w-1/2;
129- @apply @max- 3 xl/stages:w-full!;
130- }
128+ .demo {
129+ @apply h-full min-h-fit w-1/2;
130+ @apply @max- 3 xl/stages:w-full!;
131+ }
131132
132- .code {
133- @apply w-1/2 overflow-y-auto;
134- @apply @max- 3 xl/stages:w-full! @max- 3 xl/stages:flex-none;
135- }
133+ .code {
134+ @apply w-1/2 overflow-y-auto;
135+ @apply @max- 3 xl/stages:w-full! @max- 3 xl/stages:flex-none;
136136 }
137137 }
138138 }
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import { render } from 'solid-js/web';
77import IconDown from '~icons/material-symbols/keyboard-arrow-down-rounded' ;
88import IconUp from '~icons/material-symbols/keyboard-arrow-up-rounded' ;
99
10- import { Button , ToggleButton } from '@components/button' ;
10+ import { Button , PrintButton , ToggleButton } from '@components/button' ;
1111import { ClipboardAPI } from '@components/clipboard' ;
1212import styles from './style.module.css' ;
1313
@@ -134,6 +134,10 @@ registerDecorate('toolbar', pre => {
134134 < ClipboardAPI . Root ref = { el => ( clipboardRef = el ) } />
135135 </ Button . Root >
136136
137+ < ToggleButton . FitScreen kind = 'flat' class = { styles . btn } container = { pre } />
138+
139+ < PrintButton . Root kind = 'flat' class = { styles . btn } element = { ( ) => pre } />
140+
137141 < ToggleButton . Root
138142 off = { < IconUp /> }
139143 on = { < IconDown /> }
Original file line number Diff line number Diff line change @@ -14,10 +14,8 @@ export type Props = ParentProps<
1414 /**
1515 * 如果存在文字,表示文字的位置,否则该值无意义。
1616 *
17- * @remarks
18- * 在 children 不为空的情况下,如果未指定 pos,会初始化 'start'。
19- *
2017 * @reactive
18+ * @defaultValue 'start'
2119 */
2220 pos ?: 'start' | 'center' | 'end' ;
2321
@@ -69,9 +67,9 @@ export function Root(props: Props): JSX.Element {
6967 props . palette ,
7068 {
7169 [ styles . vertical ] : props . layout !== 'horizontal' ,
72- [ styles [ `pos-${ props . children ? ( props . pos ?? 'none' ) : 'none' } ` ] ] : true ,
70+ [ styles [ `pos-${ props . children ? props . pos : 'none' } ` ] ] : true ,
71+ [ styles . divider ] : true ,
7372 } ,
74- styles . divider ,
7573 props . class ,
7674 ) }
7775 >
Original file line number Diff line number Diff line change 88
99@layer components {
1010 .divider {
11- @apply flex items-center justify-center text-palette-fg whitespace-nowrap w-full h-[ 1 px ] ;
11+ @apply flex items-center justify-center text-palette-fg whitespace-nowrap w-full h-px ;
1212 }
1313
1414 .divider ::before ,
1515 .divider ::after {
16- @apply w-full grow-1 h-[ 1 px ] bg-palette-bg-low;
16+ @apply w-full grow h-px bg-palette-bg-low;
1717 }
1818
1919 .divider .pos-start ::after ,
4343 /*************************** vertical ********************************/
4444
4545 .divider .vertical {
46- @apply flex-col h-full w-[ 1 px ] ;
46+ @apply flex-col h-full w-px ;
4747 }
4848
4949 .divider .vertical ::before ,
5050 .divider .vertical ::after {
51- @apply h-full grow-1 w-[ 1 px ] ;
51+ @apply h-full grow w-px ;
5252 }
5353
5454 .divider .vertical .pos-start ::after ,
You can’t perform that action at this time.
0 commit comments