Skip to content

Commit 49d4a0b

Browse files
authored
Merge pull request #136 from Yangjaecheon-Otter-Guardians/fix/rounded-image
24-02-18 21:15 WEB 1.1 BUG FIX
2 parents 764de4e + 71f67de commit 49d4a0b

2 files changed

Lines changed: 22 additions & 21 deletions

File tree

.github/workflows/gh-pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55

66
jobs:
77
deploy:
8-
runs-on: ubuntu-18.04
8+
runs-on: ubuntu-latest
99
env:
1010
working-directory: ./frontend
1111
steps:

frontend/src/sections/Preview.tsx

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -48,31 +48,32 @@ export default function Preview({ previewRef }: Props) {
4848
}}
4949
>
5050
<div className="w-full h-[200px] tablet:h-[320px] flex justify-center items-center" ref={preview}>
51-
<div
52-
ref={previewRef}
53-
style={{
54-
width: `${previewWidth}px`,
55-
height: '100%',
56-
backgroundColor: `${tab === '1' ? currentColor.color : '#F0F0F0'}`,
57-
backgroundImage:
58-
tab !== '1' ? `url(${imageSrc})` : colorTab === '2' ? `${currentGradation.color}` : 'none',
59-
backgroundSize: 'cover',
60-
backgroundRepeat: 'no-repeat',
61-
backgroundPosition: 'center',
62-
borderRadius: '5px',
63-
}}
64-
>
65-
<TextPreview />
51+
<div className="rounded-[5px] h-full overflow-hidden">
6652
<div
53+
ref={previewRef}
6754
style={{
68-
position: 'relative',
69-
bottom: '100%',
70-
zIndex: 97,
7155
width: `${previewWidth}px`,
7256
height: '100%',
73-
background: `${isBright || tab === '1' ? 'transparent' : 'rgba(0, 0, 0, 0.3)'}`,
57+
backgroundColor: `${tab === '1' ? currentColor.color : '#F0F0F0'}`,
58+
backgroundImage:
59+
tab !== '1' ? `url(${imageSrc})` : colorTab === '2' ? `${currentGradation.color}` : 'none',
60+
backgroundSize: 'cover',
61+
backgroundRepeat: 'no-repeat',
62+
backgroundPosition: 'center',
7463
}}
75-
></div>
64+
>
65+
<TextPreview />
66+
<div
67+
style={{
68+
position: 'relative',
69+
bottom: '100%',
70+
zIndex: 97,
71+
width: `${previewWidth}px`,
72+
height: '100%',
73+
background: `${isBright || tab === '1' ? 'transparent' : 'rgba(0, 0, 0, 0.3)'}`,
74+
}}
75+
></div>
76+
</div>
7677
</div>
7778
</div>
7879
<div

0 commit comments

Comments
 (0)