trepur_components 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,7 +11,7 @@ var _addonActions = require("@storybook/addon-actions");
11
11
 
12
12
  var _README = _interopRequireDefault(require("./README.md"));
13
13
 
14
- var _Breadcrumbs2 = _interopRequireDefault(require("./Breadcrumbs"));
14
+ var _index = _interopRequireDefault(require("./index"));
15
15
 
16
16
  require("../../index.css");
17
17
 
@@ -81,7 +81,7 @@ var _default = {
81
81
  exports.default = _default;
82
82
 
83
83
  const _Breadcrumbs = args => {
84
- return /*#__PURE__*/_react.default.createElement(_Breadcrumbs2.default, {
84
+ return /*#__PURE__*/_react.default.createElement(_index.default, {
85
85
  links: links
86
86
  });
87
87
  }; // export const SecondaryButton = () => {
@@ -7,11 +7,9 @@ exports.default = exports._Breadcrumbs = void 0;
7
7
 
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
 
10
- var _addonActions = require("@storybook/addon-actions");
11
-
12
10
  var _README = _interopRequireDefault(require("./README.md"));
13
11
 
14
- var _Breadcrumbs2 = _interopRequireDefault(require("./Breadcrumbs"));
12
+ var _index = _interopRequireDefault(require("./index"));
15
13
 
16
14
  require("../../index.css");
17
15
 
@@ -81,7 +79,7 @@ var _default = {
81
79
  exports.default = _default;
82
80
 
83
81
  const _Breadcrumbs = args => {
84
- return /*#__PURE__*/_react.default.createElement(_Breadcrumbs2.default, {
82
+ return /*#__PURE__*/_react.default.createElement(_index.default, {
85
83
  links: links
86
84
  });
87
85
  }; // export const SecondaryButton = () => {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "trepur_components",
3
3
  "description": "component lib",
4
4
  "author": "trepur_ttenneb",
5
- "version": "0.1.0",
5
+ "version": "0.1.1",
6
6
  "private": false,
7
7
  "dependencies": {
8
8
  "@babel/polyfill": "^7.12.1",
@@ -1,7 +1,7 @@
1
1
  import React from 'react'
2
2
  import { action } from '@storybook/addon-actions'
3
3
  import Readme from './README.md'
4
- import BreadCrumbs from './Breadcrumbs'
4
+ import BreadCrumbs from './index'
5
5
  import '../../index.css';
6
6
 
7
7
  const links = [
@@ -1,7 +1,6 @@
1
1
  import React from 'react'
2
- import { action } from '@storybook/addon-actions'
3
2
  import Readme from './README.md'
4
- import Breadcrumbs from './Breadcrumbs'
3
+ import Breadcrumbs from './index'
5
4
  import '../../index.css';
6
5
 
7
6
  const links = [
@@ -1,144 +0,0 @@
1
- import React from 'react'
2
- import { action } from '@storybook/addon-actions'
3
- import Readme from './README.md'
4
- import Button from '../../../public/Button/Button'
5
- import '../../index.css';
6
-
7
- export default {
8
- title: 'Components/Button',
9
- argTypes: {
10
- label: {
11
- name: 'Text',
12
- control: { type: 'text' },
13
- defaultValue: 'Shop Now',
14
- },
15
- type: {
16
- name: 'Type',
17
- defaultValue: 'primary',
18
- options: ['primary', 'secondary', 'ghost'],
19
- control: { type: 'select' },
20
- },
21
- iconPlacement: {
22
- name: 'Icon',
23
- defaultValue: 'none',
24
- options: ['left', 'right', 'both', 'none'],
25
- control: { type: 'select' },
26
- },
27
- padded: {
28
- name: 'Padded',
29
- control: { type: 'boolean' },
30
- defaultValue: false,
31
- },
32
- social: {
33
- name: 'Social',
34
- defaultValue: 'None',
35
- options: ['Facebook', 'Twitter', 'Whatsapp', 'None'],
36
- control: { type: 'select' },
37
- },
38
- },
39
- decorators: [(story) => <div className={`p-4`}>{story()}</div>],
40
-
41
- parameters: {
42
- readme: {
43
- sidebar: Readme,
44
- },
45
- },
46
- }
47
-
48
- export const _Button = (args) => {
49
- return (
50
- <Button ctaText='I am a button'>
51
- </Button>
52
- )
53
- }
54
-
55
- export const SecondaryButton = () => {
56
- return (
57
- <Button ctaText='I am a button'>
58
- </Button>
59
- )
60
- }
61
-
62
- export const WithIconRight = () => {
63
- return (
64
- <Button rightIcon='thumbs-up' ctaText='I am a button'>
65
- </Button>
66
- )
67
- }
68
-
69
- WithIconRight.story = {
70
- name: 'With Icon (right)',
71
- }
72
-
73
- export const WithIconLeft = () => {
74
- return (
75
- <Button leftIcon='sign-in' ctaText='I am a button'>
76
- </Button>
77
- )
78
- }
79
-
80
- WithIconLeft.story = {
81
- name: 'With Icon (left)',
82
- }
83
-
84
- export const WithBothIcons = () => {
85
- return (
86
- <Button leftIcon='star' rightIcon='star' ctaText='I am a button'>
87
- </Button>
88
- )
89
- }
90
-
91
- export const ButtonAsExternalLink = () => {
92
- return (
93
- <Button as='a-external' ctaText='I am a button'>
94
- </Button>
95
- )
96
- }
97
-
98
- ButtonAsExternalLink.story = {
99
- name: 'Button as external link',
100
- }
101
-
102
- export const ButtonAsSemanticHtmlButton = () => {
103
- return (
104
- <Button as='button' htmlType='button' ctaText='I am a button' url='/'>
105
- </Button>
106
- )
107
- }
108
-
109
- ButtonAsSemanticHtmlButton.story = {
110
- name: 'Button as semantic html button',
111
- }
112
-
113
- export const ButtonAsSemanticHtmlSubmitButton = () => {
114
- return (
115
- <Button as='button' htmlType='submit' ctaText='I am a button'>
116
- </Button>
117
- )
118
- }
119
-
120
- ButtonAsSemanticHtmlSubmitButton.story = {
121
- name: 'Button as semantic html submit button',
122
- }
123
-
124
- export const ButtonAsInternalLink = () => {
125
- return (
126
- <Button as='Link' ctaText='I am a button' url='/'>
127
- </Button>
128
- )
129
- }
130
-
131
- ButtonAsInternalLink.story = {
132
- name: 'Button as internal link',
133
- }
134
-
135
- export const WithOnClickMethod = () => {
136
- return (
137
- <Button ctaText='I am a button' onClick={action('button-click')}>
138
- </Button>
139
- )
140
- }
141
-
142
- WithOnClickMethod.story = {
143
- name: 'With onClick method',
144
- }