@platformatic/ui-components 0.1.36 → 0.1.37

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.
package/index.js CHANGED
@@ -13,7 +13,7 @@ import GHLoginButton from './src/components/GHLoginButton'
13
13
  import HorizontalSeparator from './src/components/HorizontalSeparator'
14
14
  import Icons from './src/components/icons'
15
15
  import Input from './src/components/Input'
16
- import Sidebar from './src/components/Sidebar'
16
+ import SideBar from './src/components/SideBar'
17
17
  import Layout from './src/components/layouts/Layout'
18
18
  import List from './src/components/List'
19
19
  import ListElement from './src/components/ListElement'
@@ -44,7 +44,7 @@ export {
44
44
  GHLoginButton,
45
45
  Icons,
46
46
  Input,
47
- Sidebar,
47
+ SideBar,
48
48
  Layout,
49
49
  List,
50
50
  ListElement,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@platformatic/ui-components",
3
3
  "description": "Platformatic UI Components",
4
- "version": "0.1.36",
4
+ "version": "0.1.37",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
7
7
  "repository": {
@@ -2,10 +2,10 @@ import React, { useState } from 'react'
2
2
  import PuzzleIcon from './icons/PuzzleIcon'
3
3
  import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
4
4
  import { faChevronLeft, faPlus } from '@fortawesome/free-solid-svg-icons'
5
- import styles from './Sidebar.module.css'
5
+ import styles from './SideBar.module.css'
6
6
  import ReactTooltip from 'react-tooltip'
7
7
  import HorizontalSeparator from './HorizontalSeparator'
8
- export default function Sidebar (props) {
8
+ export default function SideBar (props) {
9
9
  const { title, defaultSelected = 0, onClickItemSelectedParent = () => {}, items = [], onClickAdd = () => {}, addTitle = 'Add' } = props
10
10
  const [collapsed, setCollapsed] = useState(false)
11
11
  const [selectedItem, setSelectedItem] = useState(defaultSelected)
@@ -1,6 +1,6 @@
1
1
  'use strict'
2
2
  import { useState } from 'react'
3
- import Sidebar from '../components/Sidebar'
3
+ import SideBar from '../components/SideBar'
4
4
  import BorderedBox from '../components/BorderedBox'
5
5
 
6
6
  const divStyle = {
@@ -11,8 +11,8 @@ const divStyle = {
11
11
  }
12
12
 
13
13
  export default {
14
- title: 'Platformatic/Sidebar',
15
- component: Sidebar,
14
+ title: 'Platformatic/SideBar',
15
+ component: SideBar,
16
16
  decorators: [
17
17
  (Story) => (
18
18
  <div style={divStyle}>
@@ -23,17 +23,17 @@ export default {
23
23
  ]
24
24
  }
25
25
 
26
- const Template = (args) => <Sidebar {...args} />
26
+ const Template = (args) => <SideBar {...args} />
27
27
 
28
- export const EmptySidebar = Template.bind({})
28
+ export const EmptySideBar = Template.bind({})
29
29
 
30
- EmptySidebar.args = {
31
- title: 'Sidebar bar empty',
30
+ EmptySideBar.args = {
31
+ title: 'SideBar bar empty',
32
32
  addTitle: 'Create',
33
- onClickAdd: () => alert('clicked on add EmptySidebar')
33
+ onClickAdd: () => alert('clicked on add EmptySideBar')
34
34
  }
35
35
 
36
- const FullSidebarTemplate = (args) => {
36
+ const FullSideBarTemplate = (args) => {
37
37
  const [items, setItems] = useState(['a very very very very very long title 1', 'Title number 2'])
38
38
  function onClickAdd () {
39
39
  const tmpItem = items.map(item => item)
@@ -42,14 +42,14 @@ const FullSidebarTemplate = (args) => {
42
42
  }
43
43
 
44
44
  return (
45
- <Sidebar items={items} onClickAdd={() => onClickAdd()} {...args} />
45
+ <SideBar items={items} onClickAdd={() => onClickAdd()} {...args} />
46
46
  )
47
47
  }
48
48
 
49
- export const FullSidebar = FullSidebarTemplate.bind({})
49
+ export const FullSideBar = FullSideBarTemplate.bind({})
50
50
 
51
- FullSidebar.args = {
52
- title: 'Sidebar bar Full',
51
+ FullSideBar.args = {
52
+ title: 'SideBar bar Full',
53
53
  addTitle: 'Create',
54
54
  onClickItemSelected: (index) => alert('selected: ' + index)
55
55
  }