Skip to content

Commit

Permalink
prettier & small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mnajdova committed Feb 20, 2024
1 parent af65e8a commit b41f37b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion apps/zero-runtime-next-app/src/app/slider/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default function SliderPage() {
const [value, setValue] = React.useState(50);
const [isColorPrimary, setIsColorPrimary] = React.useState(true);
const [size, setSize] = React.useState('medium');
const [showMarks, setShowMarks] = React.useState(true);
const [showMarks, setShowMarks] = React.useState(false);
const [isTrackInverted, setIsTrackInverted] = React.useState(false);
const [disabled, setDisabled] = React.useState(false);
const [isHorizontal, setIsHorizontal] = React.useState(true);
Expand Down
5 changes: 2 additions & 3 deletions apps/zero-runtime-next-app/src/components/Slider/Slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,9 +274,7 @@ export const SliderThumb = styled('span', {
},
variants: [
...Object.keys((theme.vars ?? theme).palette)
.filter(
(key) => theme.palette[key]?.main || (theme.vars && theme.vars.palette[key]?.mainChannel),
)
.filter((key) => (theme.vars ?? theme).palette[key].main)
.map((color) => ({
props: { color },
style: {
Expand All @@ -286,6 +284,7 @@ export const SliderThumb = styled('span', {
boxShadow: `0px 0px 0px 8px rgba(${theme.vars.palette[color].mainChannel} / 0.16)`,
}
: {
// ...(theme.palette[color].main && { boxShadow: `0px 0px 0px 8px ${alpha(theme.palette[color].main, 0.16)}` }),
boxShadow: `0px 0px 0px 8px ${alpha(theme.palette[color].main, 0.16)}`,
}),
'@media (hover: none)': {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
declare const shouldSpreadAdditionalProps: (Slot: React.ElementType<any, keyof React.JSX.IntrinsicElements>) => boolean;
declare const shouldSpreadAdditionalProps: (
Slot: React.ElementType<any, keyof React.JSX.IntrinsicElements>,
) => boolean;

export default shouldSpreadAdditionalProps;

0 comments on commit b41f37b

Please sign in to comment.