From 32f1b81c46128d818ac31cf1212423a55923ecfe Mon Sep 17 00:00:00 2001 From: manajdov Date: Tue, 7 Aug 2018 16:58:57 +0200 Subject: [PATCH 01/16] -added image shorthand to the label component --- .../Label/Variations/LabelExampleIcon.tsx | 11 ----------- .../LabelExampleIconAsShorthand.shorthand.tsx | 6 ++---- .../Variations/LabelExampleIconPosition.tsx | 11 ----------- .../LabelExampleImage.shorthand.tsx | 14 ++++++++++++++ .../LabelExampleOnIconClick.shorthand.tsx | 6 ++---- .../components/Label/Variations/index.tsx | 5 +++++ src/components/Image/Image.tsx | 6 +++++- src/components/Label/Label.tsx | 19 +++++++++++++++++-- src/components/Label/labelRules.ts | 17 +++++++++++++++-- src/components/Label/labelVariables.ts | 4 ++-- 10 files changed, 62 insertions(+), 37 deletions(-) delete mode 100644 docs/src/examples/components/Label/Variations/LabelExampleIcon.tsx delete mode 100644 docs/src/examples/components/Label/Variations/LabelExampleIconPosition.tsx create mode 100644 docs/src/examples/components/Label/Variations/LabelExampleImage.shorthand.tsx diff --git a/docs/src/examples/components/Label/Variations/LabelExampleIcon.tsx b/docs/src/examples/components/Label/Variations/LabelExampleIcon.tsx deleted file mode 100644 index 3b67504038..0000000000 --- a/docs/src/examples/components/Label/Variations/LabelExampleIcon.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import React from 'react' -import { Label, Icon } from '@stardust-ui/react' - -const LabelExampleIcon = () => ( - -) - -export default LabelExampleIcon diff --git a/docs/src/examples/components/Label/Variations/LabelExampleIconAsShorthand.shorthand.tsx b/docs/src/examples/components/Label/Variations/LabelExampleIconAsShorthand.shorthand.tsx index 17dfd19c08..04abc95525 100644 --- a/docs/src/examples/components/Label/Variations/LabelExampleIconAsShorthand.shorthand.tsx +++ b/docs/src/examples/components/Label/Variations/LabelExampleIconAsShorthand.shorthand.tsx @@ -1,12 +1,10 @@ import React from 'react' import { Label } from '@stardust-ui/react' -class LabelExampleIconAsShorthand extends React.Component<{}, { display: string }> { +class LabelExampleIconAsShorthand extends React.Component { constructor(props) { super(props) - this.state = { - display: 'inline-block', - } + this.state = {} } public hide = () => { diff --git a/docs/src/examples/components/Label/Variations/LabelExampleIconPosition.tsx b/docs/src/examples/components/Label/Variations/LabelExampleIconPosition.tsx deleted file mode 100644 index 9a13b97fe9..0000000000 --- a/docs/src/examples/components/Label/Variations/LabelExampleIconPosition.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import React from 'react' -import { Label, Icon } from '@stardust-ui/react' - -const LabelExampleIconPosition = () => ( - -) - -export default LabelExampleIconPosition diff --git a/docs/src/examples/components/Label/Variations/LabelExampleImage.shorthand.tsx b/docs/src/examples/components/Label/Variations/LabelExampleImage.shorthand.tsx new file mode 100644 index 0000000000..fbd60092eb --- /dev/null +++ b/docs/src/examples/components/Label/Variations/LabelExampleImage.shorthand.tsx @@ -0,0 +1,14 @@ +import React from 'react' +import { Label } from '@stardust-ui/react' + +const LabelExampleImageShorthand = () => ( +