From 2045e3783a3ea0a53dda9daad7ac9dd7f8d18278 Mon Sep 17 00:00:00 2001 From: rutik wankhade Date: Thu, 26 Jan 2023 11:52:29 +0530 Subject: [PATCH] feat: add option to choose mobile theme --- src/assets/images/theme6.webp | Bin 0 -> 1930 bytes src/components/Editor.js | 25 +++++++++++++-------- src/components/Themes/MobileMockupTheme.js | 4 ++-- src/components/Themes/PreviewTheme.js | 8 +++---- 4 files changed, 22 insertions(+), 15 deletions(-) create mode 100644 src/assets/images/theme6.webp diff --git a/src/assets/images/theme6.webp b/src/assets/images/theme6.webp new file mode 100644 index 0000000000000000000000000000000000000000..f19cc61781bb28f408215728a93e5d41f344caa8 GIT binary patch literal 1930 zcmbtUeN<9s7{Anxmf7b{S$Ql<4a;3F5Qre42%1zlLz2=gFWieV;X-gp@XThJO;;<{ zGRtD-N7KH}sg|w}o2%v7R&K|#mRXv)mCIS$Nc(QPfQPj8$IkW#_wYRL@AR0fNuOdnCb?fwSJj z3v5Rwjn-hd4eR_Jo9;fD6(QVF4fXF{`0=N0`+Ts=`D{(}?&D?B)`T)-;V!T1qx@^w zCRPVC&!;PAW^afMUh(|m?_JGpPwerF$||XIulA<}=hrn#uckPlm~qsvyCHJNs%NFL*} zwxy|unhu zeTM(4H{7lBvcV~x9Sv$5s}!6!1-3>_DcPTS{p`3}$Li+#x^iK@>EWFACFJ^2-o_1M zTX&z_Ra@fxBv)mYI`j8tj~wOC4v2VuA!w>1a+1!K^O5l>E#EDv5m&dC%XJH`JnlI9 zr!OU5nYbV^Fc*0BDhZ28=Q1mbgEIDsdX**O^pNkHd@r(QtgYyl1SWM>Jsfi_ME-1I zSiq*dQ_FW+7fNIorsqe`{w?Z*RbDw`J2qSf3Q0fPwJfN+FUVENFt@M;G{nPuR4MbUEgNkGb1(N<*GGf59DQyKQ-l0L6n(qsf~`jcHY0;X#jcPK$z(3AszG4@eCw2l&P^zsf(537Pjc zt-D=Qe188m$D`JUsM+^eMZ&r0(sx@$X_xzp8xL?!hr)2Uvi5PPqu;ww77^U^E$Ey6 z(;cy5^ogtBtytQ&)CHpIsy1bSy{OOYifwWI=KDGR`0@7anw`f$ZP%*Ni$x>z}&_>>GBH*g^+D=UkdHJ_?CrbBcNhXc_V5Q6~{2+(B3aM%K3ra*$h zhwS1Iqb8M6W56|fjO^rum3lMIr%-&zgVaJCH)@m~cFaVDT^_SDgsRf(AQ&-0bSll6 z7MaX*AD%ms?L|AMlf+A{$ipB8| zxkHB2#3~6E7K6nIV{zzAI-A1^r+ETghr{u5y;+svEJeWZz+U@YSRUl;u2$o2ipv=6 ziYLO|GBr&vG)Rl{a2P7x%kj3|nkGW0kZBojUSM@@q?JZQ)b|Dz(q5M4W!=UfAq=7?5e*?;A this.setState({ theme: "basic" })} - className="opacity-60 cursor-pointer border-gray-100 hover:scale-105 duration-300 hover:border-gray-200 border m-2 " + className=" cursor-pointer border-gray-100 hover:scale-105 duration-300 hover:border-gray-200 border m-2 " /> basic theme this.setState({ theme: "modern" })} - className="opacity-60 cursor-pointer border-gray-100 hover:scale-105 hover:border-gray-200 duration-300 border m-2 " + className="cursor-pointer border-gray-100 hover:scale-105 hover:border-gray-200 duration-300 border m-2 " /> basic theme this.setState({ theme: "stylish" })} - className="opacity-60 cursor-pointer border border-gray-100 hover:border-gray-200 hover:scale-105 duration-300 m-2" - /> - basic theme this.setState({ theme: "preview" })} - className="opacity-60 cursor-pointer border border-gray-100 hover:border-gray-200 hover:scale-105 duration-300 m-2" + className=" cursor-pointer border border-gray-100 hover:border-gray-200 hover:scale-105 duration-300 m-2" /> + basic theme this.setState({ theme: "outline" })} - className="opacity-60 cursor-pointer border border-gray-100 hover:border-gray-200 hover:scale-105 duration-300 m-2" + className=" cursor-pointer border border-gray-100 hover:border-gray-200 hover:scale-105 duration-300 m-2" + /> + + basic theme this.setState({ theme: "preview" })} + className=" cursor-pointer border border-gray-100 hover:border-gray-200 hover:scale-105 duration-300 m-2" + /> + basic theme this.setState({ theme: "mobile" })} + className=" cursor-pointer border border-gray-100 hover:border-gray-200 hover:scale-105 duration-300 m-2" /> diff --git a/src/components/Themes/MobileMockupTheme.js b/src/components/Themes/MobileMockupTheme.js index c55274e..a6578da 100644 --- a/src/components/Themes/MobileMockupTheme.js +++ b/src/components/Themes/MobileMockupTheme.js @@ -1,7 +1,7 @@ import React, { useState } from 'react'; const MobileMockupTheme = ({ config }) => { - const { bgColor, platform, title } = config; + const { bgColor, platform, title,font } = config; const [image, setImage] = useState() @@ -14,7 +14,7 @@ const MobileMockupTheme = ({ config }) => { > -

{title}

+

{title}

diff --git a/src/components/Themes/PreviewTheme.js b/src/components/Themes/PreviewTheme.js index 6ac000e..ccfaafc 100644 --- a/src/components/Themes/PreviewTheme.js +++ b/src/components/Themes/PreviewTheme.js @@ -1,7 +1,7 @@ import React, { useState } from 'react'; const PreviewTheme = ({ config }) => { - const { bgColor, platform,title } = config; + const { bgColor, platform, title, font } = config; const [image, setImage] = useState() @@ -13,8 +13,8 @@ const PreviewTheme = ({ config }) => { style={{ backgroundColor: bgColor }} > - -

{title}

+ +

{title}

@@ -30,7 +30,7 @@ const PreviewTheme = ({ config }) => {
- + {image ?
preview