refactor(settingsrow): Stylistic code change

This commit is contained in:
alexsparkes
2024-06-05 15:03:44 +01:00
parent c1f470f73f
commit 813e05e9c2
2 changed files with 9 additions and 9 deletions

View File

@@ -1,19 +1,19 @@
function Row(props) {
const classes = `${props.final ? 'settingsRow settingsNoBorder' : 'settingsRow'} ${props.inactive ? 'preferencesInactive' : ''}`;
const Row = (props) => {
const classes = `${props.final ? 'settingsRow settingsNoBorder' : 'settingsRow'} ${props.inactive ? 'opacity-50 pointer-events-none transition-400 ease-in-out' : ''}`;
return <div className={classes}>{props.children}</div>;
}
};
function Content(props) {
const Content = (props) => {
return (
<div className="content">
<span className="title">{props.title}</span>
<span className="subtitle">{props.subtitle}</span>
</div>
);
}
};
function Action(props) {
const Action = (props) => {
return <div className="action">{props.children}</div>;
}
};
export { Row, Content, Action };
export { Row, Content, Action };

View File

@@ -16,7 +16,7 @@ const PreferencesWrapper = ({ children, ...props }) => {
});
return (
<div className={shown ? 'preferences' : 'preferencesInactive'}>
<div className={shown ? 'preferences' : 'opacity-50 pointer-events-none transition-400 ease-in-out'}>
{props.zoomSetting && (
<Row>
<Content