Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark @/commons-ui/core components as client only for now #880

Merged
merged 9 commits into from
Sep 9, 2024
7 changes: 4 additions & 3 deletions apps/engineeringblog/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { Box, Container } from "@mui/material";
import { Section } from "@commons-ui/core";
import { Box } from "@mui/material";

export default function index() {
return (
<Container>
<Section>
<Box minHeight="1000px">Homepage</Box>
</Container>
</Section>
);
}
8 changes: 2 additions & 6 deletions packages/commons-ui-core/src/ImageButton/ImageButton.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"use client";

import ButtonBase from "@mui/material/ButtonBase";
import { styled } from "@mui/material/styles";
import PropTypes from "prop-types";
Expand Down Expand Up @@ -53,10 +55,4 @@ ImageButton.propTypes = {
width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
};

ImageButton.defaultProps = {
height: undefined,
src: undefined,
width: undefined,
};

export default ImageButton;
2 changes: 2 additions & 0 deletions packages/commons-ui-core/src/NavBar/NavBar.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"use client";

import AppBar from "@mui/material/AppBar";
import { styled } from "@mui/material/styles";
import Toolbar from "@mui/material/Toolbar";
Expand Down
2 changes: 2 additions & 0 deletions packages/commons-ui-core/src/NavList/NavList.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"use client";

import { styled } from "@mui/material/styles";
import PropTypes from "prop-types";
import React from "react";
Expand Down
8 changes: 2 additions & 6 deletions packages/commons-ui-core/src/RichTypography/RichTypography.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"use client";

import { styled } from "@mui/material/styles";
import Typography from "@mui/material/Typography";
import PropTypes from "prop-types";
Expand Down Expand Up @@ -65,10 +67,4 @@ RichTypography.propTypes = {
component: PropTypes.elementType,
};

RichTypography.defaultProps = {
children: undefined,
html: undefined,
component: undefined,
};

export default RichTypography;
8 changes: 3 additions & 5 deletions packages/commons-ui-core/src/Section/Section.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"use client";

import { Container } from "@mui/material";
import { styled } from "@mui/material/styles";
import PropTypes from "prop-types";
Expand Down Expand Up @@ -37,7 +39,7 @@ const Section = React.forwardRef(function Section(props, ref) {

return (
<SectionRoot
{...props}
{...others}
disableGutters={disableGutters}
fixed={fixed}
ownerState={ownerState}
Expand All @@ -50,8 +52,4 @@ Section.propTypes = {
fixed: PropTypes.bool,
};

Section.defaultProps = {
fixed: undefined,
};

export default Section;
Loading