Files
how2ice 005cf56baf
Some checks failed
No response / noResponse (push) Has been cancelled
CI / Continuous releases (push) Has been cancelled
CI / test-dev (macos-latest) (push) Has been cancelled
CI / test-dev (ubuntu-latest) (push) Has been cancelled
CI / test-dev (windows-latest) (push) Has been cancelled
Maintenance / main (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
init project
2025-12-12 14:26:25 +09:00

35 lines
1003 B
JavaScript

import rtlPlugin from '@mui/stylis-plugin-rtl';
import { prefixer } from 'stylis';
import { CacheProvider } from '@emotion/react';
import createCache from '@emotion/cache';
import { CssVarsProvider, extendTheme } from '@mui/joy/styles';
import FormControl from '@mui/joy/FormControl';
import FormLabel from '@mui/joy/FormLabel';
import FormHelperText from '@mui/joy/FormHelperText';
import Input from '@mui/joy/Input';
const theme = extendTheme({
direction: 'rtl',
});
const cacheRtl = createCache({
key: 'joyrtl',
stylisPlugins: [prefixer, rtlPlugin],
});
export default function RtlDemo() {
return (
<CacheProvider value={cacheRtl}>
<CssVarsProvider theme={theme}>
<div dir="rtl">
<FormControl>
<FormLabel>ملصق</FormLabel>
<Input placeholder="العنصر النائب" />
<FormHelperText>هذا نص مساعد</FormHelperText>
</FormControl>
</div>
</CssVarsProvider>
</CacheProvider>
);
}