mirror of
https://github.com/woodchen-ink/CoverView.git
synced 2025-07-18 14:01:56 +08:00
feat: add title in preview theme
This commit is contained in:
parent
c825f9de7b
commit
446af28a26
@ -1,7 +1,7 @@
|
|||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
|
|
||||||
const PreviewTheme = ({ config }) => {
|
const PreviewTheme = ({ config }) => {
|
||||||
const { bgColor, platform } = config;
|
const { bgColor, platform,title } = config;
|
||||||
|
|
||||||
const [image, setImage] = useState()
|
const [image, setImage] = useState()
|
||||||
|
|
||||||
@ -13,6 +13,9 @@ const PreviewTheme = ({ config }) => {
|
|||||||
style={{ backgroundColor: bgColor }}
|
style={{ backgroundColor: bgColor }}
|
||||||
>
|
>
|
||||||
|
|
||||||
|
|
||||||
|
<h1 className="text-2xl md:text-3xl p-10 text-white font-bold text-center">{title}</h1>
|
||||||
|
|
||||||
<div className="w-10/12 group mx-auto mt-auto mb-0 shadow-lg flex flex-col bg-white rounded-t-xl border-white">
|
<div className="w-10/12 group mx-auto mt-auto mb-0 shadow-lg flex flex-col bg-white rounded-t-xl border-white">
|
||||||
<div className="bg-gray-800 h-8 w-full p-2 flex items-center rounded-t-xl">
|
<div className="bg-gray-800 h-8 w-full p-2 flex items-center rounded-t-xl">
|
||||||
<div className="bg-red-400 h-3 w-3 rounded-full mx-1"></div>
|
<div className="bg-red-400 h-3 w-3 rounded-full mx-1"></div>
|
||||||
@ -25,6 +28,9 @@ const PreviewTheme = ({ config }) => {
|
|||||||
|
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{image ?
|
{image ?
|
||||||
<div className="">
|
<div className="">
|
||||||
<img src={image && image} className="object-cover " alt="preview" />
|
<img src={image && image} className="object-cover " alt="preview" />
|
||||||
|
Loading…
x
Reference in New Issue
Block a user