From 78eed85cba7b9483183a495e5d474c2cf9c2747f Mon Sep 17 00:00:00 2001 From: vagusX Date: Sat, 23 Apr 2022 16:53:07 +0800 Subject: [PATCH] style: `Segmented` supports rtl styles (#35188) --- components/segmented/style/index.less | 2 ++ components/segmented/style/rtl.less | 15 +++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 components/segmented/style/rtl.less diff --git a/components/segmented/style/index.less b/components/segmented/style/index.less index 6f53806014..c3d83b726a 100644 --- a/components/segmented/style/index.less +++ b/components/segmented/style/index.less @@ -114,3 +114,5 @@ will-change: transform, width; } } + +@import './rtl'; diff --git a/components/segmented/style/rtl.less b/components/segmented/style/rtl.less new file mode 100644 index 0000000000..c459bf035e --- /dev/null +++ b/components/segmented/style/rtl.less @@ -0,0 +1,15 @@ +@import '../../style/themes/index'; +@import '../../style/mixins/index'; + +@segmented-prefix-cls: ~'@{ant-prefix}-segmented'; + +.@{segmented-prefix-cls} { + &&-rtl { + direction: rtl; + } + + &&-rtl &-item-icon { + margin-right: 0; + margin-left: 6px; + } +}