Skip to content

Commit 76eb2e7

Browse files
authored
fix: Docs examples (#9190)
* fix: new docs bug followup * fix scaling of placement picker
1 parent 4c154a2 commit 76eb2e7

File tree

5 files changed

+7
-8
lines changed

5 files changed

+7
-8
lines changed

package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -274,8 +274,5 @@
274274
]
275275
}
276276
]
277-
},
278-
"locales": [
279-
"en-US"
280-
]
277+
}
281278
}

packages/dev/s2-docs/pages/s2/DateField.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import {useState} from 'react';
3232
function Example() {
3333
let [date, setDate] = useState(parseDate('2020-02-03'));
3434
let formatter = useDateFormatter({ dateStyle: 'full' });
35-
35+
3636
return (
3737
<>
3838
<DateField

packages/dev/s2-docs/src/VisualExampleClient.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1018,8 +1018,8 @@ function PlacementControl({control, value, onChange}) {
10181018
"sb . . . eb"
10191019
". bs bc be . "
10201020
`,
1021-
gridTemplateColumns: '25px 24px 24px 25px 24px',
1022-
gridTemplateRows: '25px 24px 24px 25px 24px'
1021+
gridTemplateColumns: 'calc(25px * var(--s2-scale)) calc(24px * var(--s2-scale)) calc(24px * var(--s2-scale)) calc(25px * var(--s2-scale)) calc(24px * var(--s2-scale))',
1022+
gridTemplateRows: 'calc(25px * var(--s2-scale)) calc(24px * var(--s2-scale)) calc(24px * var(--s2-scale)) calc(25px * var(--s2-scale)) calc(24px * var(--s2-scale))'
10231023
}}>
10241024
<PlacementControlItem id="top start" style={{gridArea: 'ts'}} />
10251025
<PlacementControlItem id="top" style={{gridArea: 'tc'}} />

starters/docs/src/DateField.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
white-space: nowrap;
2121
forced-color-adjust: none;
2222
cursor: text;
23+
overflow-x: auto;
24+
scrollbar-width: none;
2325

2426
&[data-focus-within] {
2527
outline: 2px solid var(--focus-ring-color);

starters/tailwind/src/DateField.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ const segmentStyles = tv({
4949

5050
export function DateInput(props: Omit<DateInputProps, 'children'>) {
5151
return (
52-
<AriaDateInput className={renderProps => fieldGroupStyles({...renderProps, class: 'block min-w-[150px] px-2 py-1.5 text-sm font-sans'})} {...props}>
52+
<AriaDateInput className={renderProps => fieldGroupStyles({...renderProps, class: 'inline min-w-[150px] px-2 py-1.5 text-sm font-sans whitespace-nowrap overflow-x-auto [scrollbar-width:none]'})} {...props}>
5353
{(segment) => <DateSegment segment={segment} className={segmentStyles} />}
5454
</AriaDateInput>
5555
);

0 commit comments

Comments
 (0)