Skip to content

Commit

Permalink
[Toolpad Editor] Fix : text component alignment rendering (#2587)
Browse files Browse the repository at this point in the history
  • Loading branch information
rohanprasadofficial authored Sep 4, 2023
1 parent 8307f28 commit 1eb90b1
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
1 change: 0 additions & 1 deletion packages/toolpad-components/src/Text.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,6 @@ function TextContent({ value, loading, sx, variant }: TextContentProps) {
<MuiTypography
sx={{
...sx,
width: '100%',
// This will give it height, even when empty.
// REMARK: Does it make sense to put it in MUI core?
[`&:empty::before`]: { content: '""', display: 'inline-block' },
Expand Down
21 changes: 21 additions & 0 deletions test/visual/components/fixture/toolpad/pages/components/page.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,24 @@ spec:
- component: Checkbox
name: checkbox
children: []
- component: Text
name: text
children: []
props:
value: start-text
layout:
horizontalAlign: start
- component: Text
name: text1
children: []
layout:
horizontalAlign: center
props:
value: center-text
- component: Text
name: text2
children: []
layout:
horizontalAlign: end
props:
value: end-text

0 comments on commit 1eb90b1

Please sign in to comment.