Skip to content

Commit

Permalink
[pickers][docs] Fix missing leading slashes in URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Aug 17, 2024
1 parent 992174e commit 28680d7
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 22 deletions.
4 changes: 2 additions & 2 deletions docs/src/modules/components/overview/CommunityOrPro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export default function CommunityOrPro() {
'Free forever under an MIT license. Includes Date Pickers, Time Pickers, and Date Time Pickers.',
]}
backgroundColor="subtle"
link="/pricing/"
link="https://mui.com/pricing/"
/>
</Box>
<Box sx={{ flexBasis: '50%' }}>
Expand All @@ -71,7 +71,7 @@ export default function CommunityOrPro() {
'Requires a commercial license. Includes all Community components plus the Date and Time Range Pickers.',
]}
backgroundColor="subtle"
link="/pricing/"
link="https://mui.com/pricing/"
/>
</Box>
</Stack>
Expand Down
6 changes: 3 additions & 3 deletions docs/src/modules/components/overview/Internationalization.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ function TimezonesDemo() {

return (
<LocalizationProvider dateAdapter={AdapterDayjs}>
<DemoWrapper link="/x/react-date-pickers/timezone">
<DemoWrapper link="/x/react-date-pickers/timezone/">
<Stack
spacing={2}
flexGrow={1}
Expand Down Expand Up @@ -230,7 +230,7 @@ function LanguagesDemo() {
selectedLanguage={selectedLanguage}
/>
}
link="/x/react-date-pickers/localization"
link="/x/react-date-pickers/localization/"
>
<ThemeProvider theme={theme}>
<Stack
Expand Down Expand Up @@ -290,7 +290,7 @@ function ValidationDemo() {

return (
<LocalizationProvider dateAdapter={AdapterDayjs}>
<DemoWrapper link="/x/react-date-pickers/validation">
<DemoWrapper link="/x/react-date-pickers/validation/">
<ThemeProvider theme={theme}>
<Stack
spacing={2}
Expand Down
33 changes: 16 additions & 17 deletions docs/src/modules/components/overview/Keyboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -316,21 +316,21 @@ export function KeyboardSvg({ selectedKey, handleKeySelection }: KeyboardSvgProp
selectedKey.key.toLowerCase() === label.toLowerCase() &&
selectedKey.location === location,
})}
onMouseDown={(e) => {
onMouseDown={(event) => {
if (shouldSelect) {
e.preventDefault();
event.preventDefault();

handleKeySelection(e, {
handleKeySelection(event, {
key: label,
location: location || 0,
code: code || label,
keyCode: keyCode || 0,
});
}
}}
onMouseUp={(e) => {
onMouseUp={(event) => {
if (shouldSelect) {
handleKeySelection(e, null);
handleKeySelection(event, null);
}
}}
>
Expand Down Expand Up @@ -370,12 +370,12 @@ export function KeyboardSvg({ selectedKey, handleKeySelection }: KeyboardSvgProp
className={clsx(key, 'key-root', {
selected: selectedKey && selectedKey.key.toLowerCase() === key.toLowerCase(),
})}
onMouseDown={(e) => {
e.preventDefault();
handleKeySelection(e, { key, location, code, keyCode });
onMouseDown={(event) => {
event.preventDefault();
handleKeySelection(event, { key, location, code, keyCode });
}}
onMouseUp={(e) => {
handleKeySelection(e, null);
onMouseUp={(event) => {
handleKeySelection(event, null);
}}
>
<KeyRectangle
Expand All @@ -400,7 +400,7 @@ type SelectedKey = {
code?: string;
keyCode?: number;
};
type HandleKeySelection = (e: React.SyntheticEvent, key: SelectedKey | null) => void;
type HandleKeySelection = (event: React.SyntheticEvent, key: SelectedKey | null) => void;

export default function Keyboard() {
const [selectedKey, setSelectedKey] = React.useState<SelectedKey | null>(null);
Expand Down Expand Up @@ -463,10 +463,9 @@ export default function Keyboard() {
}
description="The MUI X Date Pickers feature advanced keyboard support that's compliant with WCAG and WAI-ARIA standards, so users who require assistive technology can navigate your interface with ease."
/>

<Button
size="small"
href="/x/react-date-pickers/accessibility"
href="/x/react-date-pickers/accessibility/"
endIcon={<ArrowForwardIcon />}
sx={{ width: 'fit-content' }}
>
Expand All @@ -478,11 +477,11 @@ export default function Keyboard() {
<DateField
defaultValue={dayjs('12/12/2023')}
ref={ref}
onKeyDown={(e: React.KeyboardEvent) => {
onKeyDown={(event: React.KeyboardEvent) => {
setSelectedKey({
key: e.key,
code: e.code,
location: e.location,
key: event.key,
code: event.code,
location: event.location,
});
}}
onKeyUp={() => {
Expand Down

0 comments on commit 28680d7

Please sign in to comment.