Skip to content

Commit

Permalink
fix(react-components): slider UI issue and exposed logMetrics option …
Browse files Browse the repository at this point in the history
…in RevealContext props (#4955)
  • Loading branch information
pramod-cog authored Jan 9, 2025
1 parent 1ab3dee commit dcbd7fd
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
2 changes: 1 addition & 1 deletion react-components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cognite/reveal-react-components",
"version": "0.73.11",
"version": "0.73.12",
"exports": {
".": {
"import": "./dist/index.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export type RevealContextProps = {
| 'pointCloudEffects'
| 'enableEdges'
| 'onLoading'
| 'logMetrics'
>;
};

Expand Down
19 changes: 18 additions & 1 deletion react-components/src/components/RevealToolbar/SlicerButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export const SlicerButton = (): ReactElement => {
<Button {...props} type="ghost" icon=<SliceIcon /> aria-label="Slice models" />
</CogsTooltip>
)}>
<RangeSlider
<StyledRangeSlider
min={0}
max={1}
step={0.01}
Expand All @@ -122,4 +122,21 @@ const StyledMenu = styled(Menu)`
min-width: 32px !important;
padding: 12px 8px 12px 8px !important;
overflow: hidden;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.cogs-v10.cogs-slider .rc-slider-rail {
height: 100% !important;
width: 4px !important;
`;

const StyledRangeSlider = styled(RangeSlider)`
height: 100% !important;
width: 4px !important;
display: flex;
flex-direction: row;
justify-content: center;
}
`;

0 comments on commit dcbd7fd

Please sign in to comment.