Skip to content

Commit

Permalink
use stylex
Browse files Browse the repository at this point in the history
  • Loading branch information
vinceau committed Feb 14, 2024
1 parent 4aa3356 commit 1a0bcfb
Showing 1 changed file with 15 additions and 26 deletions.
41 changes: 15 additions & 26 deletions src/renderer/pages/home/sidebar/slippi_store.tsx
Original file line number Diff line number Diff line change
@@ -1,25 +1,16 @@
import styled from "@emotion/styled";
import { Button } from "@mui/material";
import * as stylex from "@stylexjs/stylex";
import React from "react";

import { ExternalLink } from "@/components/external_link";
import shopImage from "@/styles/images/shop-image.png";

const SlippiStoreContainer = styled.div`
height: 100%;
background-color: #21ba44;
& > div {
height: 100%;
width: 100%;
}
`;

const styles = stylex.create({
container: {
position: "relative",
flex: "1",
overflow: "hidden",
backgroundColor: "#21ba44",
},
image: {
position: "absolute",
Expand All @@ -45,22 +36,20 @@ const styles = stylex.create({
export const SlippiStore = React.memo(function SlippiStore() {
return (
<div {...stylex.props(styles.container)}>
<SlippiStoreContainer>
<img src={shopImage} {...stylex.props(styles.image)} />
<div {...stylex.props(styles.buttonContainer)}>
<Button
variant="contained"
sx={{ color: "white", textTransform: "uppercase" }}
color="secondary"
fullWidth={true}
LinkComponent={ExternalLink}
href="https://start.gg/slippi/shop"
>
Click to Shop
</Button>
</div>
<div {...stylex.props(styles.closeDate)}>Store Ends: 2/27/24</div>
</SlippiStoreContainer>
<img src={shopImage} {...stylex.props(styles.image)} />
<div {...stylex.props(styles.buttonContainer)}>
<Button
variant="contained"
sx={{ color: "white", textTransform: "uppercase" }}
color="secondary"
fullWidth={true}
LinkComponent={ExternalLink}
href="https://start.gg/slippi/shop"
>
Click to Shop
</Button>
</div>
<div {...stylex.props(styles.closeDate)}>Store Ends: 2/27/24</div>
</div>
);
});

0 comments on commit 1a0bcfb

Please sign in to comment.