diff --git a/docs/app/Examples/elements/Input/Variations/InputIconElement.js b/docs/app/Examples/elements/Input/Variations/InputIconElement.js new file mode 100644 index 0000000000..0ce0262955 --- /dev/null +++ b/docs/app/Examples/elements/Input/Variations/InputIconElement.js @@ -0,0 +1,11 @@ +import React from 'react' +import { Icon, Input } from 'stardust' + +const InputIconElement = () => ( + } + placeholder='Search...' + /> +) + +export default InputIconElement diff --git a/docs/app/Examples/elements/Input/Variations/InputIconPosition.js b/docs/app/Examples/elements/Input/Variations/InputIconPosition.js new file mode 100644 index 0000000000..ed336a3d64 --- /dev/null +++ b/docs/app/Examples/elements/Input/Variations/InputIconPosition.js @@ -0,0 +1,8 @@ +import React from 'react' +import { Input } from 'stardust' + +const InputIconPosition = () => ( + +) + +export default InputIconPosition diff --git a/docs/app/Examples/elements/Input/Variations/InputIconProps.js b/docs/app/Examples/elements/Input/Variations/InputIconProps.js new file mode 100644 index 0000000000..f9c5691b49 --- /dev/null +++ b/docs/app/Examples/elements/Input/Variations/InputIconProps.js @@ -0,0 +1,11 @@ +import React from 'react' +import { Input } from 'stardust' + +const InputIconProps = () => ( + +) + +export default InputIconProps diff --git a/docs/app/Examples/elements/Input/Variations/index.js b/docs/app/Examples/elements/Input/Variations/index.js index 962ee96c88..81ece7e57a 100644 --- a/docs/app/Examples/elements/Input/Variations/index.js +++ b/docs/app/Examples/elements/Input/Variations/index.js @@ -9,6 +9,17 @@ const InputVariations = () => ( description='An input can be formatted with an icon' examplePath='elements/Input/Variations/InputIcon' /> + + + { common.isConformant(Icon) common.hasSubComponents(Icon, [IconGroup]) - common.rendersChildren(Icon) + common.implementsIconProp(Icon) common.propKeyOnlyToClassName(Icon, 'bordered') common.propKeyOnlyToClassName(Icon, 'circular') @@ -15,6 +15,7 @@ describe('Icon', () => { common.propKeyOnlyToClassName(Icon, 'disabled') common.propKeyOnlyToClassName(Icon, 'fitted') common.propKeyAndValueToClassName(Icon, 'flipped') + common.propKeyOnlyToClassName(Icon, 'icon') common.propKeyOnlyToClassName(Icon, 'inverted') common.propValueOnlyToClassName(Icon, 'name') common.propKeyOnlyToClassName(Icon, 'link') @@ -22,6 +23,8 @@ describe('Icon', () => { common.propKeyAndValueToClassName(Icon, 'rotated') common.propValueOnlyToClassName(Icon, 'size') + common.rendersChildren(Icon) + it('renders as an by default', () => { shallow() .should.have.tagName('i')