반응형

styled.ts

import styled from "styled-components";
import Box from "@mui/material/Box";

export const MyBox = styled(Box)({
  marginTop: 100,
  display: "flex",
  flexDirection: "column",
  alignItems: "center",
});

 

index.tsx

import * as S from "./styled";

export const Sample = () => {
  return (
    <S.MyBox>
      <TextField
        autoComplete="given-name"
        name="userEmail"
        required
        fullWidth
        id="userEmail"
        label="Email Address"
        autoFocus
      />
      <Button fullWidth variant="contained">
        Sign In
      </Button>
    </S.MyBox>
  );
};
반응형

+ Recent posts