diff --git a/dev/App.tsx b/dev/App.tsx index e2fb88af..b75f1327 100644 --- a/dev/App.tsx +++ b/dev/App.tsx @@ -8,13 +8,29 @@ export type Theme = 'dark' | 'light'; export default defineComponent({ setup() { - const theme = ref('dark'); + const theme = ref('light'); + const previewTheme = ref('default'); + const codeCssName = ref('gradient'); return () => (
-
(theme.value = v)} /> + {codeCssName.value} +
(theme.value = v)} + onPreviewChange={(pt: string) => { + previewTheme.value = pt; + }} + onCodeCssNameChange={(ct: string) => { + codeCssName.value = ct; + }} + />
- +
); diff --git a/dev/Header/index.less b/dev/Header/index.less index a4bd07c7..d59ce808 100644 --- a/dev/Header/index.less +++ b/dev/Header/index.less @@ -2,12 +2,14 @@ .page-header { color: @colorReverse; - padding: 5rem 6rem; + padding: 1rem 6rem; text-align: center; background-color: #159957; background-image: linear-gradient(120deg, #155799, #159957); .header-actions { + margin-bottom: 10px; + .btn-header { font-size: 1rem; font-family: inherit; diff --git a/dev/Header/index.tsx b/dev/Header/index.tsx index 4aa79085..cfd069a1 100644 --- a/dev/Header/index.tsx +++ b/dev/Header/index.tsx @@ -8,6 +8,14 @@ export default defineComponent({ onChange: { type: Function as PropType<(v: Theme) => void>, default: () => {} + }, + onPreviewChange: { + type: Function as PropType<(v: string) => void>, + default: () => {} + }, + onCodeCssNameChange: { + type: Function as PropType<(v: string) => void>, + default: () => {} } }, setup(props) { @@ -15,20 +23,81 @@ export default defineComponent({