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

Wrap Typography #1886

Merged
merged 10 commits into from
Jul 21, 2023
7 changes: 2 additions & 5 deletions packages/odyssey-react-mui/src/Checkbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,8 @@
* See the License for the specific language governing permissions and limitations under the License.
*/

import {
Checkbox as MuiCheckbox,
FormControlLabel,
Typography,
} from "@mui/material";
import { Checkbox as MuiCheckbox, FormControlLabel } from "@mui/material";
import { Typography } from "./Typography";
import { ChangeEventHandler, memo, useMemo } from "react";
import { useTranslation } from "react-i18next";

Expand Down
2 changes: 1 addition & 1 deletion packages/odyssey-react-mui/src/Field.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ import { memo, ReactElement, useMemo } from "react";
import {
FormControl as MuiFormControl,
FormLabel as MuiFormLabel,
Typography,
} from "@mui/material";
import { FieldError } from "./FieldError";
import { FieldHint } from "./FieldHint";
import { FieldLabel } from "./FieldLabel";
import { Typography } from "./Typography";
import { useUniqueId } from "./useUniqueId";
import { useTranslation } from "react-i18next";

Expand Down
4 changes: 2 additions & 2 deletions packages/odyssey-react-mui/src/FieldLabel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { memo, useMemo } from "react";

import { useTranslation } from "react-i18next";
import { ScreenReaderText } from "./ScreenReaderText";
import { Typography } from "@mui/material";
import { Typography } from "./Typography";

export type FieldLabelProps = {
hasVisibleLabel: boolean;
Expand All @@ -39,7 +39,7 @@ const FieldLabel = ({
<MuiInputLabel htmlFor={inputId} id={id}>
<span>{text}</span>
{isOptional && (
<Typography variant="subtitle1">
<Typography variant="caption">
{t("fieldlabel.optional.text")}
</Typography>
)}
Expand Down
5 changes: 3 additions & 2 deletions packages/odyssey-react-mui/src/Fieldset.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@

import { memo, ReactElement } from "react";

import { Box, Typography } from "@mui/material";
import { Box } from "@mui/material";
import { Infobox } from "./Infobox";
import { Typography } from "./Typography";
import { useUniqueId } from "./useUniqueId";

export type FieldsetProps = {
Expand Down Expand Up @@ -75,7 +76,7 @@ const Fieldset = ({
{legend}
</Typography>
{description && (
<Typography component="p" variant="subtitle2">
<Typography component="p" variant="caption">
{description}
</Typography>
)}
Expand Down
3 changes: 2 additions & 1 deletion packages/odyssey-react-mui/src/Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@

import { memo, ReactElement } from "react";

import { Box, Typography } from "@mui/material";
import { Box } from "@mui/material";
import { Button } from "./Button";
import { Infobox } from "./Infobox";
import { Typography } from "./Typography";
import { useUniqueId } from "./useUniqueId";

export const formEncodingTypeValues = [
Expand Down
3 changes: 2 additions & 1 deletion packages/odyssey-react-mui/src/PaginatedTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
* See the License for the specific language governing permissions and limitations under the License.
*/

import { AlertProps, TablePaginationProps, Typography } from "@mui/material";
import { AlertProps, TablePaginationProps } from "@mui/material";
import { Typography } from "./Typography";
import MaterialReactTable, {
MRT_PaginationState,
type MRT_ColumnFiltersState,
Expand Down
Loading