From 003f3db2e060b72af472795ea19c35c34279cd59 Mon Sep 17 00:00:00 2001 From: 07akioni <07akioni2@gmail.com> Date: Sun, 12 Sep 2021 22:20:42 +0800 Subject: [PATCH] fix(page-header): rtl style --- .../src/styles/page-header-rtl.cssr.ts | 20 ------------ src/page-header/src/styles/rtl.cssr.ts | 31 +++++++++++++++++++ src/page-header/styles/rtl.ts | 2 +- 3 files changed, 32 insertions(+), 21 deletions(-) delete mode 100644 src/page-header/src/styles/page-header-rtl.cssr.ts create mode 100644 src/page-header/src/styles/rtl.cssr.ts diff --git a/src/page-header/src/styles/page-header-rtl.cssr.ts b/src/page-header/src/styles/page-header-rtl.cssr.ts deleted file mode 100644 index 6ccd715fb..000000000 --- a/src/page-header/src/styles/page-header-rtl.cssr.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { c, cB, cM } from '../../../_utils/cssr' - -export default c([ - cB('page-header-wrapper', [ - cM('rtl', [ - cB('page-header-header', ` - direction: rtl; - `), - cB('page-header', ` - direction: rtl; - `), - cB('page-header-content', ` - direction: rtl; - `), - cB('page-header-footer', ` - direction: rtl; - `) - ]) - ]) -]) diff --git a/src/page-header/src/styles/rtl.cssr.ts b/src/page-header/src/styles/rtl.cssr.ts new file mode 100644 index 000000000..9c2fbbf4c --- /dev/null +++ b/src/page-header/src/styles/rtl.cssr.ts @@ -0,0 +1,31 @@ +import { cB, cM, cE } from '../../../_utils/cssr' + +export default cB('page-header-wrapper', [ + cM('rtl', [ + cB('page-header-header', ` + direction: rtl; + `), + cB('page-header', ` + direction: rtl; + `, [ + cE('back', ` + margin-right: 0; + margin-left: 16px; + `), + cE('avatar', ` + margin-right: 0; + margin-left: 12px; + `), + cE('title', ` + margin-right: 0; + margin-left: 16px; + `) + ]), + cB('page-header-content', ` + direction: rtl; + `), + cB('page-header-footer', ` + direction: rtl; + `) + ]) +]) diff --git a/src/page-header/styles/rtl.ts b/src/page-header/styles/rtl.ts index a5e7684b6..fdce41344 100644 --- a/src/page-header/styles/rtl.ts +++ b/src/page-header/styles/rtl.ts @@ -1,4 +1,4 @@ -import rtlStyle from '../src/styles/page-header-rtl.cssr' +import rtlStyle from '../src/styles/rtl.cssr' export default { name: 'PageHeader',