Skip to content

Commit

Permalink
Merge pull request #4948 from voxel51/bug/fix-casing-textview
Browse files Browse the repository at this point in the history
snake_case the TextView component
  • Loading branch information
manivoxel51 authored Oct 18, 2024
2 parents 3fd5ba8 + ea56505 commit b095575
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions app/packages/core/src/plugins/SchemaIO/components/TextView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,28 @@ export default function TextView(props: ViewPropsType<NumberSchemaType>) {
const { view = {} } = schema;
const {
color = "primary",
fontSize = "1rem",
font_size = "1rem",
title = "",
textTransform = "none",
text_transform = "none",
variant = "body1",
bold = false,
italic = false,
align = "inherit",
noWrap = false,
textDecoration = "none",
letterSpacing = "normal",
lineHeight = "normal",
fontFamily = "default",
no_wrap = false,
text_decoration = "none",
letter_spacing = "normal",
line_height = "normal",
font_family = "default",
width = "auto",
displayMode = "block",
display_mode = "block",
padding = "1rem",
} = view;

const sx = {
fontFamily,
font_family,
...(bold ? { fontWeight: "bold" } : {}),
...(italic ? { fontStyle: "italic" } : {}),
...(noWrap
...(no_wrap
? { whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }
: {}),
};
Expand All @@ -38,17 +38,17 @@ export default function TextView(props: ViewPropsType<NumberSchemaType>) {
<Box {...getComponentProps(props, "container")}>
<Typography
padding={padding}
display={displayMode}
display={display_mode}
width={width}
variant={variant}
color={color}
fontSize={fontSize}
textTransform={textTransform}
fontSize={font_size}
textTransform={text_transform}
align={align}
letterSpacing={letterSpacing}
noWrap={noWrap}
lineHeight={lineHeight}
textDecoration={textDecoration}
letterSpacing={letter_spacing}
noWrap={no_wrap}
lineHeight={line_height}
textDecoration={text_decoration}
sx={sx}
{...getComponentProps(props, "text")}
>
Expand Down

0 comments on commit b095575

Please sign in to comment.