Skip to content

Commit

Permalink
Merge pull request #90 from bcrumbs/release/tag
Browse files Browse the repository at this point in the history
Release/tag
  • Loading branch information
netmenya committed May 8, 2018
2 parents e08c9af + 8fcfd0d commit e7ef0a5
Show file tree
Hide file tree
Showing 25 changed files with 1,155 additions and 2 deletions.
8 changes: 7 additions & 1 deletion demo/export.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,4 +171,10 @@ export { PreloaderIndexRoute }
export { PreloaderRoute }
from './routes/progress/preloader/preloader';
export { PreloaderDemoRoute }
from './routes/progress/preloader/demo';
from './routes/progress/preloader/demo';
export { TagIndexRoute }
from './routes/tag';
export { TagRoute }
from './routes/tag/tag';
export { TagDemoRoute }
from './routes/tag/demo';
61 changes: 61 additions & 0 deletions demo/routes/tag/demo.js
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';
60 changes: 60 additions & 0 deletions demo/routes/tag/icon.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions demo/routes/tag/index.js
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';
11 changes: 11 additions & 0 deletions demo/routes/tag/snippets/1.snippet
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." />
7 changes: 7 additions & 0 deletions demo/routes/tag/snippets/2.snippet
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" />}
/>
24 changes: 24 additions & 0 deletions demo/routes/tag/tag.js
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';
2 changes: 2 additions & 0 deletions packages/reactackle-tabs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@
"dependencies": {
"lodash.omit": "^4.5.0",
"prop-types": "^15.5.10",
"reactackle-core": "^1.0.0-beta.8",
"reactackle-icons": "^1.0.0-beta.8"
},
"peerDependencies": {
"react": "^16.0.0",
"reactackle-core": "^1.0.0-beta.8",
"reactackle-icons": "^1.0.0-beta.8",
"styled-components": "^2.1.1"
},
"devDependencies": {
Expand Down
9 changes: 9 additions & 0 deletions packages/reactackle-tag/LICENSE.md
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.
17 changes: 17 additions & 0 deletions packages/reactackle-tag/README.md
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)
5 changes: 5 additions & 0 deletions packages/reactackle-tag/__tests__/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"env": {
"jest": true
}
}

0 comments on commit e7ef0a5

Please sign in to comment.