-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #90 from bcrumbs/release/tag
Release/tag
- Loading branch information
Showing
25 changed files
with
1,155 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import React from 'react'; | ||
import { Tag, IconSvg } from 'reactackle'; | ||
import { RouteDemo } from '../../components/Route/RouteStructure'; | ||
|
||
import { | ||
TestBox, | ||
DemoSnippet, | ||
DemoPreview, | ||
DemoCode, | ||
} from '../../components/DemoSnippet/DemoSnippet'; | ||
|
||
import SnippetDefault from './snippets/1.snippet'; | ||
import Snippet2 from './snippets/2.snippet'; | ||
|
||
export const TagDemoRoute = () => ( | ||
<RouteDemo> | ||
<DemoSnippet title="Some demo"> | ||
<DemoPreview> | ||
<TestBox contentSpaced> | ||
<Tag text="simple tag" /> | ||
<Tag | ||
text="simple tag with icon" | ||
icon={<IconSvg />} | ||
/> | ||
<Tag text="tag with tooltip" tooltipText="tooltip" /> | ||
<Tag text="removable tag" removable /> | ||
</TestBox> | ||
|
||
<TestBox maxWidth="200px" contentSpaced> | ||
<Tag | ||
text="bounded tag with forbidden line wrapping." | ||
tooltipText="bounded tag with forbidden line wrapping." | ||
bounded | ||
/> | ||
</TestBox> | ||
</DemoPreview> | ||
<DemoCode | ||
code={SnippetDefault} | ||
/> | ||
</DemoSnippet> | ||
|
||
<DemoSnippet title="Custom styling"> | ||
<DemoPreview> | ||
<TestBox contentSpaced> | ||
<Tag | ||
text="simple tag" | ||
bgColor="palevioletred" | ||
iconColor="papayawhip" | ||
textColor="white" | ||
icon={<IconSvg />} | ||
/> | ||
</TestBox> | ||
</DemoPreview> | ||
<DemoCode | ||
code={Snippet2} | ||
/> | ||
</DemoSnippet> | ||
</RouteDemo> | ||
); | ||
|
||
TagDemoRoute.displayName = 'TagDemoRoute'; |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import React from 'react'; | ||
// eslint-disable-next-line | ||
import TagCode from '!raw-loader!../../../packages/reactackle-tag/src/Tag'; | ||
import { RouteInfo, RouteProps } from '../../components/Route/RouteStructure'; | ||
|
||
const propTypes = RouteInfo.propTypes; | ||
const defaultProps = { | ||
...RouteInfo.defaultProps, | ||
componentTitle: 'Tag', | ||
routeTitle: 'Tag', | ||
}; | ||
|
||
const itemProps = ( | ||
<RouteProps | ||
componentCode={TagCode} | ||
title="Tag Props" | ||
/> | ||
); | ||
|
||
export const TagIndexRoute = props => ( | ||
<div className="route-info"> | ||
<RouteInfo {...props}> | ||
{itemProps} | ||
</RouteInfo> | ||
</div> | ||
); | ||
|
||
TagIndexRoute.propTypes = propTypes; | ||
TagIndexRoute.defaultProps = defaultProps; | ||
TagIndexRoute.displayName = 'TagIndexRoute'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<Tag text="simple tag" /> | ||
|
||
<Tag | ||
text="simple tag with icon" | ||
icon={<IconDefault size="custom" color="currentColor" />} | ||
/> | ||
|
||
<Tag text="tag with tooltip" tooltipText="tooltip" /> | ||
<Tag text="removable tag" removable /> | ||
|
||
<Tag text="bounded tag with forbidden line wrapping." bounded tooltipText="bounded tag with forbidden line wrapping." /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<Tag | ||
text="simple tag" | ||
bgColor="palevioletred" | ||
iconColor="papayawhip" | ||
textColor="white" | ||
icon={<IconDefault size="custom" color="currentColor" />} | ||
/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
'use strict'; | ||
|
||
import React from 'react'; | ||
import { RouteStructure } from '../../components/Route/RouteStructure'; | ||
|
||
export const TagRoute = props => ( | ||
<RouteStructure | ||
componentTitle="Tag" | ||
tabs={[ | ||
{ | ||
text: 'General Info', | ||
href: '/tag', | ||
}, | ||
{ | ||
text: 'Use Cases', | ||
href: '/tag/demo', | ||
}, | ||
]} | ||
> | ||
{props.children} | ||
</RouteStructure> | ||
); | ||
|
||
TagRoute.displayName = 'TagRoute'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
**The MIT License (MIT)** | ||
|
||
Copyright (c) 2017 Braincrumbs. | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Reactackle-tag | ||
|
||
|
||
**Part of [Reactackle](https://www.npmjs.com/package/reactackle) - an open-source components library built with [React](https://facebook.github.io/react/) and [Styled Components](https://www.styled-components.com).** | ||
|
||
## Installation | ||
|
||
**Using NPM:** | ||
``` | ||
npm install reactackle-tag --save | ||
``` | ||
|
||
**Using Yarn:** | ||
``` | ||
yarn add reactackle-tag | ||
``` | ||
[Component Demo](http://reactackle-docs.braincrumbs.io/#/tag/demo) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"env": { | ||
"jest": true | ||
} | ||
} |
Oops, something went wrong.