Skip to content

Commit b390132

Browse files
committed
refactor(Rotate): update slider label styles and introduce slider header for improved layout
1 parent 6850bab commit b390132

File tree

1 file changed

+10
-14
lines changed

1 file changed

+10
-14
lines changed

packages/react-components/react-motion-components-preview/stories/src/Rotate/RotateDefault.stories.tsx

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,20 @@ const useClasses = makeStyles({
7171
gap: tokens.spacingHorizontalS,
7272
},
7373
sliderLabel: {
74-
fontSize: tokens.fontSizeBase200,
74+
fontSize: tokens.fontSizeBase300,
7575
fontWeight: tokens.fontWeightMedium,
7676
color: tokens.colorNeutralForeground1,
7777
},
7878
valueDisplay: {
79-
fontSize: tokens.fontSizeBase100,
79+
fontSize: tokens.fontSizeBase200,
8080
color: tokens.colorNeutralForeground2,
8181
fontFamily: tokens.fontFamilyMonospace,
8282
},
83+
sliderHeader: {
84+
display: 'flex',
85+
justifyContent: 'space-between',
86+
alignItems: 'center',
87+
},
8388
});
8489

8590
const LoremIpsum = () => (
@@ -124,7 +129,6 @@ export const Default = (props: React.ComponentProps<typeof Rotate>) => {
124129
{/* Rotation Settings Section */}
125130
<div className={classes.controlSection}>
126131
<Field className={classes.field}>
127-
<Label className={classes.sliderLabel}>Rotation Axis</Label>
128132
<RadioGroup value={axis} onChange={(_, data) => setAxis(data.value as Axis3D)} layout="horizontal">
129133
<Radio value="x" label="X-axis" />
130134
<Radio value="y" label="Y-axis" />
@@ -133,7 +137,7 @@ export const Default = (props: React.ComponentProps<typeof Rotate>) => {
133137
</Field>
134138

135139
<Field className={classes.sliderField}>
136-
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
140+
<div className={classes.sliderHeader}>
137141
<Label htmlFor={enterAngleSliderId} className={classes.sliderLabel}>
138142
Enter Angle
139143
</Label>
@@ -154,7 +158,7 @@ export const Default = (props: React.ComponentProps<typeof Rotate>) => {
154158
{/* Timing & Perspective Section */}
155159
<div className={classes.controlSection}>
156160
<Field className={classes.sliderField}>
157-
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
161+
<div className={classes.sliderHeader}>
158162
<Label htmlFor={durationSliderId} className={classes.sliderLabel}>
159163
Duration
160164
</Label>
@@ -172,7 +176,7 @@ export const Default = (props: React.ComponentProps<typeof Rotate>) => {
172176
</Field>
173177

174178
<Field className={classes.sliderField}>
175-
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
179+
<div className={classes.sliderHeader}>
176180
<Label htmlFor={perspectiveSliderId} className={classes.sliderLabel}>
177181
Perspective
178182
</Label>
@@ -199,11 +203,3 @@ export const Default = (props: React.ComponentProps<typeof Rotate>) => {
199203
</div>
200204
);
201205
};
202-
203-
Default.parameters = {
204-
docs: {
205-
description: {
206-
// story: description,
207-
},
208-
},
209-
};

0 commit comments

Comments
 (0)