Skip to content

Commit

Permalink
Feature: update styling
Browse files Browse the repository at this point in the history
  • Loading branch information
pKallert committed Dec 29, 2023
1 parent 639b6cd commit 777e6d0
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default class DimensionSelectorOption extends PureComponent {
label: PropTypes.string.isRequired,
disallowed: PropTypes.bool,
existing: PropTypes.bool,
url: PropTypes.bool
url: PropTypes.string
})
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,10 +286,10 @@ export default class DimensionSwitcher extends PureComponent {

const variants = [...currentDocumentNode?.otherNodeVariants];
variants.push(currentDocumentNode.dimensions)
console.log(variants);
for(let dimensionKey of Object.keys(contentDimensions)){
if(dimensionKey == dimensionName && contentDimensions.length !== 1) {
break;

for (const dimensionKey of Object.keys(contentDimensions)) {
if (dimensionKey === dimensionName || Object.keys(contentDimensions).length === 1) {
break;
}
Object.entries(variants).forEach(entry => {
const [key, value] = entry;
Expand All @@ -298,12 +298,13 @@ export default class DimensionSwitcher extends PureComponent {
delete variants[key]

Check failure on line 298 in packages/neos-ui/src/Containers/PrimaryToolbar/DimensionSwitcher/index.js

View workflow job for this annotation

GitHub Actions / Code style

Expected indentation of 20 spaces but found 19
}
});

Check failure on line 300 in packages/neos-ui/src/Containers/PrimaryToolbar/DimensionSwitcher/index.js

View workflow job for this annotation

GitHub Actions / Code style

Block must not be padded by blank lines

}
const dimensions = []
Object.values(variants).forEach(entry => {
dimensions.push(entry[dimensionName]);
});

return dimensions;
}

Expand All @@ -317,7 +318,7 @@ export default class DimensionSwitcher extends PureComponent {
label: i18nRegistry.translate(presetConfiguration.label),
disallowed: !(allowedPresets[dimensionName] && allowedPresets[dimensionName].includes(presetName)),
existing: documentDimensions.some(dimension=> presetConfiguration.values.includes(dimension)),
url: (Object.keys(contentDimensionsObject).length === 1) ? this.createDirectDimensionsLink( dimensionName, presetName) : null
url: (Object.keys(contentDimensions).length === 1) ? this.createDirectDimensionsLink( dimensionName, presetName) : null
});
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ class SelectBox_Option_SingleLine extends PureComponent {
const isDisabled = disabled || option.disabled;

const finalClassNames = mergeClassNames({
[className]: className
[style.linkedItem]: true
[className]: className,
[style.linkedItem]: linkOptions
});
const previewElementIcon = option.icon ? option.icon : (icon ? icon : null);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
.dropdownLink{
color: white;
padding: 5px 14px;
display: inline-block;
}
.linkedItem{
background-color: red;
padding: 0px !important;
}

0 comments on commit 777e6d0

Please sign in to comment.