Skip to content

Commit 4c7216e

Browse files
committed
[chore] Improve on home page view, card view
1 parent 82a4411 commit 4c7216e

File tree

1 file changed

+17
-18
lines changed

1 file changed

+17
-18
lines changed

src/components/atoms/GamePreview.tsx

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,13 @@ export function GamePreview({
2424
'f',
2525
'fv',
2626
'panel',
27+
'outline',
2728
{
2829
padding: css.$v.spaceM,
30+
textAlign: 'center',
31+
cursor: 'crosshair',
2932
h2: css.mix('header', { marginBottom: css.$v.spaceM }),
30-
p: css.mix('body', 'fg', { marginBottom: css.$v.spaceL }),
33+
p: css.mix('body', { marginBottom: css.$v.spaceM}),
3134
div: {
3235
overflow: 'hidden',
3336
width: '100%',
@@ -40,8 +43,7 @@ export function GamePreview({
4043
width: '100%',
4144
height: '100%',
4245
},
43-
},
44-
button: css.mix('button'),
46+
}
4547
},
4648
style || {}
4749
);
@@ -51,23 +53,20 @@ export function GamePreview({
5153
<div>{children}</div>
5254
<h2>{title}</h2>
5355
<p>{description}</p>
54-
<button type="button">
55-
Play
56-
<Script data={{ source, index }}>
57-
{({ el, data, $ }) => {
58-
function start() {
59-
el.$publish('modal:open', { frag: data.source });
60-
}
56+
<Script data={{ source, index }}>
57+
{({ el, data, $ }) => {
58+
function start() {
59+
el.$publish('modal:open', { frag: data.source });
60+
}
6161

62-
$.on(el, 'click', () => start());
62+
$.on(el, 'click', () => start());
6363

64-
el.$subscribe('sys:randomgame', (val) => {
65-
if (val !== data.index) return;
66-
start();
67-
});
68-
}}
69-
</Script>
70-
</button>
64+
el.$subscribe('sys:randomgame', (val) => {
65+
if (val !== data.index) return;
66+
start();
67+
});
68+
}}
69+
</Script>
7170
</article>
7271
);
7372
}

0 commit comments

Comments
 (0)