1 | /**
|
2 | * Sets the current RTL value.
|
3 | */
|
4 | export function setRTL(isRTL) {
|
5 | if (_rtl !== isRTL) {
|
6 | _rtl = isRTL;
|
7 | }
|
8 | }
|
9 | /**
|
10 | * Gets the current RTL value.
|
11 | */
|
12 | export function getRTL() {
|
13 | if (_rtl === undefined) {
|
14 | _rtl =
|
15 | typeof document !== 'undefined' &&
|
16 | !!document.documentElement &&
|
17 | document.documentElement.getAttribute('dir') === 'rtl';
|
18 | }
|
19 | return _rtl;
|
20 | }
|
21 | // This has been split into 2 lines because it was working in Fabric due to the code being transpiled to es5, so this
|
22 | // was converted to var while not working in Fluent that uses babel to transpile the code to be es6-like. Splitting the
|
23 | // logic into two lines, however, allows it to work in both scenarios.
|
24 | var _rtl;
|
25 | _rtl = getRTL();
|
26 | export function getStyleOptions() {
|
27 | return {
|
28 | rtl: getRTL(),
|
29 | };
|
30 | }
|
31 | //# sourceMappingURL=StyleOptionsState.js.map |
\ | No newline at end of file |