diff --git a/.changeset/fluffy-grapes-sort.md b/.changeset/fluffy-grapes-sort.md new file mode 100644 index 0000000000..461d80275d --- /dev/null +++ b/.changeset/fluffy-grapes-sort.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-user-settings': patch +--- + +Dynamically layout User Settings theme toggle container diff --git a/plugins/user-settings/src/components/General/UserSettingsThemeToggle.tsx b/plugins/user-settings/src/components/General/UserSettingsThemeToggle.tsx index 333050f2a4..4a28a72818 100644 --- a/plugins/user-settings/src/components/General/UserSettingsThemeToggle.tsx +++ b/plugins/user-settings/src/components/General/UserSettingsThemeToggle.tsx @@ -50,24 +50,34 @@ type TooltipToggleButtonProps = { }; const useStyles = makeStyles(theme => ({ + container: { + display: 'flex', + flexWrap: 'wrap', + width: '100%', + justifyContent: 'space-between', + alignItems: 'center', + paddingBottom: 8, + paddingRight: 16, + }, list: { + width: 'initial', [theme.breakpoints.down('xs')]: { + width: '100%', padding: `0 0 12px`, }, }, listItemText: { - [theme.breakpoints.down('xs')]: { - paddingRight: 0, - paddingLeft: 0, - }, + paddingRight: 0, + paddingLeft: 0, }, listItemSecondaryAction: { + position: 'relative', + transform: 'unset', + top: 'auto', + right: 'auto', + paddingLeft: 16, [theme.breakpoints.down('xs')]: { - width: '100%', - top: 'auto', - right: 'auto', - position: 'relative', - transform: 'unset', + paddingLeft: 0, }, }, })); @@ -109,7 +119,10 @@ export const UserSettingsThemeToggle = () => { }; return ( - +