Skip to content

Commit

Permalink
Address PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
garrettberg committed Jan 29, 2018
1 parent ad2095a commit 6d93ac8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -67,7 +67,7 @@ import DirectionProvider, { DIRECTIONS } from 'react-with-direction/dist/Directi

Use `AutoDirectionProvider` around, for example, user-generated content where the text direction is unknown or may change. This renders a `DirectionProvider` with the `direction` prop automatically set based on the `text` prop provided.

Direction will be determined based on the first strong LTR/RTL character in the `text` string. Strings with no strong direction (e.g., numbers) will inherit the direction from it's nearest `DirectionProider` anscestor.
Direction will be determined based on the first strong LTR/RTL character in the `text` string. Strings with no strong direction (e.g., numbers) will inherit the direction from its nearest `DirectionProvider` ancestor or default to LTR.

Usage example:

Expand Down
2 changes: 1 addition & 1 deletion src/AutoDirectionProvider.jsx
Expand Up @@ -31,7 +31,7 @@ function AutoDirectionProvider({
direction={dir}
inline={inline}
>
{children}
{React.Children.only(children)}
</DirectionProvider>
);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/AutoDirectionProvider_test.jsx
Expand Up @@ -39,7 +39,7 @@ describe('<AutoDirectionProvider>', () => {
expect(wrapper.find(DirectionProvider)).to.have.prop('direction', DIRECTIONS.RTL);
});

it('in inherited from context for neutral strings', () => {
it('is inherited from context for neutral strings', () => {
const wrapper = shallow(
(
<AutoDirectionProvider text="1">
Expand Down

0 comments on commit 6d93ac8

Please sign in to comment.