Conversation
Codecov Report
@@ Coverage Diff @@
## master #333 +/- ##
=======================================
Coverage 89.73% 89.73%
=======================================
Files 64 64
Lines 1237 1237
Branches 180 180
=======================================
Hits 1110 1110
Misses 125 125
Partials 2 2
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
The default padding should already be 0, so I think you only need to apply padding for the non-fitted case.
...(!fitted && {
paddingTop: pxToRem(variables.dividerPadding),
paddingBottom: pxToRem(variables.dividerPadding),
}),
ac99743 to
40b6e1a
Compare
40b6e1a to
30e4ec6
Compare
|
You should NOT do this: A list should not contain any direct children apart from list items. This will definitely break things. |
|
@hughreeling What would be the best way to have a similar line in between list items? Considering what you mentioned above, my present options are:
Please let me know if there are other options as well |
|
Lists definitely need to contain only list items. (
https://dev.w3.org/html5/html-author/#the-ol-element)
I think the options are for the list item to contain the divider, or to
style the list item.
Currently you could so something like <Divider as='li' /> but I highly
recommend NOT doing this, it's pretty much certain to make accessibility /
keyboard navigation.
…On Tue, Oct 9, 2018 at 3:26 PM Gopal Goel ***@***.***> wrote:
@hughreeling <https://github.com/hughreeling> What would be the best way
to have a similar line in between list items?
Considering what you mentioned above, my present options are:
1. Add a border to the bottom of the list item when required.
2. Insert a Divider inside the ListItem.
3. Make a ListItem serve as a divider itself. E.g. <List.Item divider/>
renders a list item which look and feel exactly like the Divider.
Please let me know if there are other options as well
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#333 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGjGSzs8tA4ebgnxf2RX9TrTUiQ4Q1FXks5ujJSwgaJpZM4XM02o>
.
|
|
it's pretty much certain to break accessibility / keyboard navigation.
…On Tue, Oct 9, 2018 at 4:02 PM Hugh Eland ***@***.***> wrote:
Lists definitely need to contain only list items. (
https://dev.w3.org/html5/html-author/#the-ol-element)
I think the options are for the list item to contain the divider, or to
style the list item.
Currently you could so something like <Divider as='li' /> but I highly
recommend NOT doing this, it's pretty much certain to make accessibility /
keyboard navigation.
On Tue, Oct 9, 2018 at 3:26 PM Gopal Goel ***@***.***>
wrote:
> @hughreeling <https://github.com/hughreeling> What would be the best way
> to have a similar line in between list items?
>
> Considering what you mentioned above, my present options are:
>
> 1. Add a border to the bottom of the list item when required.
> 2. Insert a Divider inside the ListItem.
> 3. Make a ListItem serve as a divider itself. E.g. <List.Item
> divider/> renders a list item which look and feel exactly like the
> Divider.
>
> Please let me know if there are other options as well
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#333 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AGjGSzs8tA4ebgnxf2RX9TrTUiQ4Q1FXks5ujJSwgaJpZM4XM02o>
> .
>
|
| import React from 'react' | ||
| import { Divider } from '@stardust-ui/react' | ||
|
|
||
| const DividerExampleFitted = () => ( |
There was a problem hiding this comment.
this example could be eliminated - as there is no Children API variation for this case
src/components/Divider/Divider.tsx
Outdated
| content: customPropTypes.contentShorthand, | ||
|
|
||
| /** A divider can be fitted, without any space above or below it. */ | ||
| divider: PropTypes.bool, |
There was a problem hiding this comment.
this should be name as fitted. Also, please, make sure that IDividerProps reflects the changes you've introduced for the API.
In general, would suggest to make tests in docs (probably, you've done that), but with dev console being opened - in that case you won't let these problems pass your checks :)
There was a problem hiding this comment.
Ah, a silly one. Fixing it right away.
kuzhelov
left a comment
There was a problem hiding this comment.
please, address the changes raised in comments before merging
Divider
fittedpropA divider can be
fittedto render a divider that is simply a line with no space above or below it.TODO
API Proposal
fittedUse cases:
A
fitteddivider can be used inside a List component to separate few list items from another.The above code give us something like,
