Skip to content

Commit 6d93ac8

Browse files
committed
Address PR feedback
1 parent ad2095a commit 6d93ac8

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ import DirectionProvider, { DIRECTIONS } from 'react-with-direction/dist/Directi
6767

6868
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.
6969

70-
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.
70+
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.
7171

7272
Usage example:
7373

src/AutoDirectionProvider.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function AutoDirectionProvider({
3131
direction={dir}
3232
inline={inline}
3333
>
34-
{children}
34+
{React.Children.only(children)}
3535
</DirectionProvider>
3636
);
3737
}

tests/AutoDirectionProvider_test.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ describe('<AutoDirectionProvider>', () => {
3939
expect(wrapper.find(DirectionProvider)).to.have.prop('direction', DIRECTIONS.RTL);
4040
});
4141

42-
it('in inherited from context for neutral strings', () => {
42+
it('is inherited from context for neutral strings', () => {
4343
const wrapper = shallow(
4444
(
4545
<AutoDirectionProvider text="1">

0 commit comments

Comments
 (0)