Skip to content

Container Component updated to v1 API #277

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 24 commits into from
Jun 26, 2016
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
27dc01c
Container Component updated to v1 API
jhchill666 Jun 24, 2016
a5441e5
Fixes lint errors
jhchill666 Jun 24, 2016
7631a91
Merge branch 'master' into feature/container
jhchill666 Jun 24, 2016
d64f2b2
eslint-disable max-len for long example paragraphs
jhchill666 Jun 24, 2016
84f9f53
eslint-disable max-len for long example paragraphs
jhchill666 Jun 24, 2016
9e2d9b4
Merge remote-tracking branch 'origin/feature/container' into feature/…
jhchill666 Jun 24, 2016
06fde8b
fixes lint errors
jhchill666 Jun 24, 2016
724759a
Function name amended to match Class name
jhchill666 Jun 24, 2016
bd4b8de
Function name amended to match Class name
jhchill666 Jun 24, 2016
241a022
Message relocated from example component to examples container
jhchill666 Jun 24, 2016
f420da9
<h2> element replaced with Stardust Header.H2
jhchill666 Jun 24, 2016
a083fd5
Message relocated from example component to examples container
jhchill666 Jun 24, 2016
bd628e3
Redundant ContainerComponent element removed in favour of tag inline
jhchill666 Jun 24, 2016
77b4bb5
Removes redundant Container class check - handled in base tests
jhchill666 Jun 24, 2016
0d50e12
Alignment constrained to alignment prop
jhchill666 Jun 24, 2016
edf673a
[Test] Alignment constrained to alignment prop
jhchill666 Jun 24, 2016
9bb4509
fixes lint errors
jhchill666 Jun 25, 2016
f31fe72
Merge branch 'master' into feature/container
jhchill666 Jun 25, 2016
ad81023
Image Component updated to v1 API
jhchill666 Jun 24, 2016
6330ca0
Image Component updated to v1 API
jhchill666 Jun 24, 2016
f2781cd
Merge branch 'master' into feature/container
jhchill666 Jun 26, 2016
2366b67
Implements useAlignedProp / common.implementAlignProp
jhchill666 Jun 26, 2016
8863f6d
Merge remote-tracking branch 'origin/feature/container' into feature/…
jhchill666 Jun 26, 2016
28f6d7f
Fixes lint errors
jhchill666 Jun 26, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions docs/app/Examples/elements/Container/ContainerExamples.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React, { Component } from 'react'
import ContainerTypesExamples from './Types/ContainerTypesExamples'
import ContainerVariationsExamples from './Variations/ContainerVariationsExamples'

export default class ContainerExamples extends Component {
render() {
return (
<div>
<ContainerTypesExamples />
<ContainerVariationsExamples />
</div>
)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/* eslint-disable max-len */

import React, { Component } from 'react'
import { Container } from 'stardust'

export default class ContainerContainerExample extends Component {
render() {
return (
<Container>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa strong. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede link mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi.</p>
</Container>
)
}
}
16 changes: 16 additions & 0 deletions docs/app/Examples/elements/Container/Types/ContainerTextExample.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/* eslint-disable max-len */

import React, { Component } from 'react'
import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample'
import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection'
import { Message } from 'stardust'

export default class ContainerTypesExamples extends Component {
render() {
return (
<ExampleSection title='Types'>
<ComponentExample
title='Container'
description='A standard container'
examplePath='elements/Container/Types/ContainerContainerExample'
/>
<ComponentExample
title='Text Container'
description='A container can reduce its maximum width to more naturally accomodate a single column of text'
examplePath='elements/Container/Types/ContainerTextExample'
>
<Message className='info'>
<p>A text container is a simpler markup alternative to using a grid with a single column, and is designed to have a reasonable maximum width for displaying flowing text</p>
</Message>
</ComponentExample>
</ExampleSection>
)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/* eslint-disable max-len */

import React, { Component } from 'react'
import { Container, Divider } from 'stardust'

export default class ContainerAlignmentExample extends Component {
render() {
return (
<div>
<Container left>
Left Aligned
</Container>
<Container center>
Center Aligned
</Container>
<Container right>
Right Aligned
</Container>
<Container justified>
<b>Justified</b>
<Divider />
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa strong. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede link mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi.</p>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa strong. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede link mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi.</p>
</Container>
</div>

)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/* eslint-disable max-len */

import React, { Component } from 'react'
import { Container, Message } from 'stardust'

export default class ContainerFluidExample extends Component {
render() {
return (
<div>
<Message className='info'>
Fluid containers are useful for setting text alignment, or other variations on unstyled content
</Message>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment with the <Message /> here as above. Let's hoist it up out of the example code.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, have actioned all of those. Sorry still getting your code under my
belt!

Levi Thomason mailto:[email protected]
24 June 2016 at 17:09

In
docs/app/Examples/elements/Container/Variations/ContainerFluidExample.js
https://github.com/TechnologyAdvice/stardust/pull/277#discussion_r68421369:

@@ -0,0 +1,22 @@
+/* eslint-disable max-len */
+
+import React, { Component } from 'react'
+import { Container, Message } from 'stardust'
+
+export default class ContainerFluidExample extends Component {

  • render() {
  • return (
  • Fluid containers are useful for setting text alignment, or other
    variations on unstyled content

Same comment with the || here as above. Let's hoist it up
out of the example code.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/TechnologyAdvice/stardust/pull/277/files/bd4b8de6b915721a488337a4e1ce7a9194ce895a#r68421369,
or mute the thread
https://github.com/notifications/unsubscribe/AAWHs2B-2HIurEHZ2jwPvh7bkDBeQXRjks5qPAEfgaJpZM4I9hiP.

Sent from Postbox
https://www.postbox-inc.com/?utm_source=email&utm_medium=siglink&utm_campaign=reach

<Container fluid>
<h2>Dogs Roles with Humans</h2>
<p>Domestic dogs inherited complex behaviors, such as bite inhibition, from their wolf ancestors, which would have been pack hunters with complex body language. These sophisticated forms of social cognition and communication may account for their trainability, playfulness, and ability to fit into human households and social situations, and these attributes have given dogs a relationship with humans that has enabled them to become one of the most successful species on the planet today.</p>
<p>The dogs' value to early human hunter-gatherers led to them quickly becoming ubiquitous across world cultures. Dogs perform many roles for people, such as hunting, herding, pulling loads, protection, assisting police and military, companionship, and, more recently, aiding handicapped individuals. This impact on human society has given them the nickname "man's best friend" in the Western world. In some cultures, however, dogs are also a source of meat.</p>
</Container>
</div>

)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import React, { Component } from 'react'
import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample'
import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection'

export default class ContainerVariationsExamples extends Component {
render() {
return (
<ExampleSection title='Variations'>
<ComponentExample
title='Text Alignment'
description='A container can specify its text alignment'
examplePath='elements/Container/Variations/ContainerAlignmentExample'
/>
<ComponentExample
title='Fluid'
description='A fluid container has no maximum width'
examplePath='elements/Container/Variations/ContainerFluidExample'
/>
</ExampleSection>
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection'
export default class DividerVariationsExamples extends Component {
render() {
return (
<ExampleSection title='Types'>
<ExampleSection title='Variations'>
<ComponentExample
title='Inverted'
description='A divider can have its colors inverted'
Expand Down
93 changes: 64 additions & 29 deletions src/elements/Container/Container.js
Original file line number Diff line number Diff line change
@@ -1,33 +1,68 @@
import React, { Component, PropTypes } from 'react'
import classNames from 'classnames'
import META from '../../utils/Meta'
import cx from 'classnames'
import React, { PropTypes } from 'react'
import META from '../../utils/Meta';
import { getUnhandledProps, useKeyOnly } from '../../utils/propUtils'

/**
* A container that gives your content some side padding.
* A container limits content to a maximum width
*/
export default class Container extends Component {
static propTypes = {
children: PropTypes.node,
className: PropTypes.string,
}

static _meta = {
library: META.library.semanticUI,
name: 'Container',
type: META.type.element,
}

render() {
const classes = classNames(
'sd-container',
'ui',
this.props.className,
'container',
)
return (
<div {...this.props} className={classes}>
{this.props.children}
</div>
)
}
function Container(props) {
const {
text, left, center, right, justified, fluid,
children, className,
} = props

const classes = cx('sd-container ui',
useKeyOnly(text, 'text'),
useKeyOnly(left, 'left aligned'),
useKeyOnly(center, 'center aligned'),
useKeyOnly(right, 'right aligned'),
useKeyOnly(justified, 'justified'),
Copy link
Member

@levithomason levithomason Jun 24, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are 4 types of possible class to props mappings for SUI classes. The alignment class here follows this API pattern:

aligned="left"    // useValueAndKey(aligned, 'aligned')
aligned="right"   // useValueAndKey(aligned, 'aligned')
aligned="center"  // useValueAndKey(aligned, 'aligned')

One reason we use this key/value relationship is because two simultaneous alignment props are not valid:

<Container right left />

Where as making those values of the aligned prop means you can only have one at a time:

<Container aligned="left" />

However, the justified option breaks down however since the resulting class is not justified aligned. We've not yet run into this matchup yet so I'm open to suggestions. The best immediate thought I have is to still allow aligned="justified" for the API consistency, then in cx buildup:

cx(
  aligned === 'justified' ? 'justified' : useValueAndKey(aligned, 'aligned'),
)

Thoughts?

EDIT

Fixed incorrect className suggestion.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think your suggestion of just using a ternary operator is probably the best option. You could go down the route of adding unnecessary additions to propUtils but seems it's succinct enough to be used in this one isolated case.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we'd only require one useValueAndKey mapping rather than 3?

You are correct, I edited my typo shortly after submitting. See above.

For example, Button actions. It feels right that you'd declare a but this breaks down when stipulating that it should be left or right , but would seem even worse when combining it with an Icon:

<Button left action right icon/>

For a prop that may be boolean only or enum, there is the keyOrValueAndKey() util which allows us to do this (I assume you meant Input instead of Button):

<Input action />                       // <input class="action" />
<Input action='left' />                // <input class="left action" />
<Input action='right' />               // <input class="right action" />

Or indeed, imposing defined props types with oneOf enums:

<Button align="left|center|right|justify" />

I think this is the way to go. You can see this in use in the Label for the pointing prop. A Label can be pointing alone or pointing with a direction, but never more than one.

I think with this one special handling for the justified case we have a pretty good solution:

cx(
  aligned === 'justified' ? 'justified' : useValueAndKey(aligned, 'aligned'),
)

If the aligned prop is justified, then the class will be justified only. Otherwise, the class will be the value of the prop and it's key:

<Container aligned='justified' />  // <div class="ui container justified"></div>
<Container aligned='left' />       // <div class="ui container left aligned"></div>
<Container aligned='right' />      // <div class="ui container right aligned"></div>

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note, we won't be able to use the common test for propValueAndKeyToClassName since it has special handling for one of the values.

Since the alignment prop is pretty common, it may warrant it's own common.implementsAlignmentProp() test to handle the special justified case.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I'd digested more of your code after making that statement so
please disregard.

Have amended the Container alignment as per your suggestion and updated test

Levi Thomason wrote:

In src/elements/Container/Container.js
https://github.com/TechnologyAdvice/stardust/pull/277#discussion_r68436320:

  • {this.props.children}
    -
  • )
  • }
    +function Container(props) {
  • const {
  • text, left, center, right, justified, fluid,
  • children, className,
  • } = props
    +
  • const classes = cx('sd-container ui',
  • useKeyOnly(text,'text'),
  • useKeyOnly(left,'left aligned'),
  • useKeyOnly(center,'center aligned'),
  • useKeyOnly(right,'right aligned'),
  • useKeyOnly(justified,'justified'),

we'd only require one useValueAndKey mapping rather than 3?

You are correct, I edited my typo shortly after submitting. See above.

For example, Button actions. It feels right that you'd declare a
but this breaks down when stipulating that it should be left or
right , but would seem even worse when combining it with an Icon:

||

For a prop that may be boolean only /or/ enum, there is the
|keyOrValueAndKey()| util which allows us to do this (I assume you
meant Input instead of Button):

//
//
//

Or indeed, imposing defined props types with oneOf enums:

|

|

I think this is the way to go. You can see this in use in the Label
for the pointing
https://github.com/TechnologyAdvice/stardust/blob/master/src/elements/Label/Label.js#L142

prop. A Label can be pointing alone or pointing with a direction, but
never more than one.

I think with this one special handling for the justified case we have
a pretty good solution:

cx(
aligned=== 'justified' ? 'justified' : useValueAndKey(aligned,'aligned'),
)

If the |aligned| prop is |justified|, then the class will be
|justified| only. Otherwise, the class will be the value of the prop
and it's key:

//


//

//


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/TechnologyAdvice/stardust/pull/277/files/f420da9c4eb10853132c436ba6a06faa82ffeba2#r68436320,

or mute the thread
https://github.com/notifications/unsubscribe/AAWHs9U_F5YTx6bTtZ-CBJqbKR0bn5vJks5qPBp5gaJpZM4I9hiP.

useKeyOnly(fluid, 'fluid'),
'container',
className
)

const ContainerComponent = 'div'
const rest = getUnhandledProps(Container, props)

return (
<ContainerComponent className={classes} {...rest}>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the ContainerComponent never changes, let's just use the <div ... inline here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Absolutely. Wasn't sure how stringently to follow your initial efforts
on Label. Will optimize as the default cause of action in future.

Levi Thomason mailto:[email protected]
24 June 2016 at 17:24

In src/elements/Container/Container.js
https://github.com/TechnologyAdvice/stardust/pull/277#discussion_r68423440:

  • const classes = cx('sd-container ui',
  • useKeyOnly(text, 'text'),
  • useKeyOnly(left, 'left aligned'),
  • useKeyOnly(center, 'center aligned'),
  • useKeyOnly(right, 'right aligned'),
  • useKeyOnly(justified, 'justified'),
  • useKeyOnly(fluid, 'fluid'),
  • 'container',
  • className
  • )
    +
  • const ContainerComponent = 'div'
  • const rest = getUnhandledProps(Container, props)
    +
  • return (
  • <ContainerComponent className={classes} {...rest}>

Since the |ContainerComponent| never changes, let's just use the |<div
...| inline here.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/TechnologyAdvice/stardust/pull/277/files/f420da9c4eb10853132c436ba6a06faa82ffeba2#r68423440,
or mute the thread
https://github.com/notifications/unsubscribe/AAWHs1bthM95zj3FbrWdWrv0AFmfQBUbks5qPASrgaJpZM4I9hiP.

Sent from Postbox
https://www.postbox-inc.com/?utm_source=email&utm_medium=siglink&utm_campaign=reach

{children}
</ContainerComponent>
)
}

Container._meta = {
library: META.library.semanticUI,
name: 'Container',
type: META.type.element,
}

Container.propTypes = {
/** Primary content of the Container */
children: PropTypes.node,

/** Classes to add to the container className. */
className: PropTypes.string,

/** Reduce maximum width to more naturally accomodate text */
text: PropTypes.bool,

/** Align container content to left */
left: PropTypes.bool,

/** Align container content to center */
center: PropTypes.bool,

/** Align container content to right */
right: PropTypes.bool,

/** Justify content to available space */
justified: PropTypes.bool,

/** Container has no maximum with */
fluid: PropTypes.bool,
}

export default Container
27 changes: 27 additions & 0 deletions test/specs/elements/Container/Container-test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import React from 'react'

import Container from 'src/elements/Container/Container'
import * as common from 'test/specs/commonTests'

describe('Container', () => {
common.isConformant(Container)
common.rendersChildren(Container)
common.hasUIClassName(Container)

common.propKeyOnlyToClassName(Container, 'text')
common.propKeyOnlyToClassName(Container, 'left', { className: 'aligned' })
common.propKeyOnlyToClassName(Container, 'center', { className: 'aligned' })
common.propKeyOnlyToClassName(Container, 'right', { className: 'aligned' })
common.propKeyOnlyToClassName(Container, 'justified')
common.propKeyOnlyToClassName(Container, 'fluid')

it('renders a <div /> element', () => {
shallow(<Container />)
.should.have.tagName('div')
})

it('adds the Container class', () => {
shallow(<Container />)
.should.have.className('container')
})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test is automated as part of the common.isConformant() test. All components are required to include their Semantic UI component className.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the common.propKeyOnlyToClassName are still required, but not the 2
'it' blocks?

Levi Thomason mailto:[email protected]
24 June 2016 at 17:26

In test/specs/elements/Container/Container-test.js
https://github.com/TechnologyAdvice/stardust/pull/277#discussion_r68423748:

  • common.propKeyOnlyToClassName(Container, 'text')
  • common.propKeyOnlyToClassName(Container, 'left', { className:
    'aligned' })
  • common.propKeyOnlyToClassName(Container, 'center', { className:
    'aligned' })
  • common.propKeyOnlyToClassName(Container, 'right', { className:
    'aligned' })
  • common.propKeyOnlyToClassName(Container, 'justified')
  • common.propKeyOnlyToClassName(Container, 'fluid')
    +
  • it('renders a
    element', () => {
  • shallow()
  • .should.have.tagName('div')
  • })
    +
  • it('adds the Container class', () => {
  • shallow()
  • .should.have.className('container')
  • })

This test is automated as part of the |common.isConformant()| test.
All components are required to include their Semantic UI component
className.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/TechnologyAdvice/stardust/pull/277/files/a083fd536fd2f416c6214e2af929e6c51b4e8d58#r68423748,
or mute the thread
https://github.com/notifications/unsubscribe/AAWHs8T9VMTH_JMod5KlJmmO1HaBUkeJks5qPAU9gaJpZM4I9hiP.

Sent from Postbox
https://www.postbox-inc.com/?utm_source=email&utm_medium=siglink&utm_campaign=reach

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, should've been more explicit. You can keep all tests in this file, just remove this one:

it('adds the Container class', ...

All components must include a class that matches the component name. A <Container /> must at least include <div class="container" />, for example. Because this is true of all components, it is part of the base conformance test.

The conformance tests use the component's _meta object to ensure the className includes the component name.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After updating this PR and getting the new tools merged in #285, remove this test:

-  it('does not have aligned class when justified', () => {
-    shallow(<Container aligned='justified' />)
-      .should.not.have.className('aligned')
-  })

Then, replace line 12 above:

-common.propKeyAndValueToClassName(Container, 'aligned')
+common.implementsAlignedProp(Container)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

})