react-component / react-component/drawer

Drawer has css wrong effect for rtl dir

Open
#40 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
425
Forks
108
Avg merge
2h 1m
Merged PRs (30d)
1

Description

Hello,

I am trying i18n for drawer component. So I switch dir between ltr and rtl. Also I put drawer position to left for ltr and right for rtl. It works correctly for ltr but the css got mess up for rtl. Need some help...

<Drawer
        className={style.sideBar}
        level={null}
        onHandleClick={this.onCollapse}
        onMaskClick={this.onCollapse}
        open={!collapsed}
        placement={locale === 'ar' ? 'right' : 'left'}
        width={256}
/>

ltr drawer closed
ltr drawer opened
rtl drawer closed
rtl drawer opened

Best Regards,
F. Tahir

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Drawer example with dir switched between ltr and rtl, using left placement for ltr and right placement for rtl. Compare the four linked screenshots and inspect the Drawer styling and placement behavior; done means the rtl drawer has the intended layout without the reported CSS effects while ltr behavior remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, javascript, react, typescript
Domain
frontend, internationalization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.